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
FlowExceptionsToTaskScheduler
boolean inside theRelayCommandAttribute
which I've just discovered today.Few months back I couldn't find a way to fire
TaskScheduler.UnobservedTaskException
orAndroid.Runtime.AndroidEnvironment.UnhandledExceptionRaiser
. Any exception just crashes the application, only my owntry...catch
blocks can prevent that.But now setting
FlowExceptionsToTaskScheduler = true
works just great and the exception goes toUnobservedTaskException
.Excellent!
FlowExceptionsToTaskScheduler
is false by default...but I want it to betrue
by 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
GuardedRelayCommandAttribute
which extends theRelayCommandAttribute
and sets the property totrue
by default on initialization....except I cannot. Because
RelayCommandAttribute
is sealed.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions