Replies: 1 comment
-
|
You are using Even if it were unsealed so you could use inheritance, it would no longer be picked up by the source generation logic. Instead, you should propose that a configuration option should be provided to set the default value used during source generation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm building an Android app with .MAUI with .NET 7 and I wanted to try the behavior of
FlowExceptionsToTaskSchedulerboolean inside theRelayCommandAttributewhich I've just discovered today.Few months back I couldn't find a way to fire
TaskScheduler.UnobservedTaskExceptionorAndroid.Runtime.AndroidEnvironment.UnhandledExceptionRaiser. Any exception just crashes the application, only my owntry...catchblocks can prevent that.But now setting
FlowExceptionsToTaskScheduler = trueworks just great and the exception goes toUnobservedTaskException.Excellent!
FlowExceptionsToTaskScheduleris false by default...but I want it to betrueby default everywhere, I really need to avoid crashing of the app at all costs, showing some error dialogs instead.Having
[RelayCommand(FlowExceptionsToTaskScheduler = true)]everywhere works...but it's kinda ugly.So let's just make my own class, something like
GuardedRelayCommandAttributewhich extends theRelayCommandAttributeand sets the property totrueby default on initialization....except I cannot. Because
RelayCommandAttributeis sealed.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions