Add Error event in Blazor ViewModel (#3279)#3915
Conversation
| await vm.SaveAsync(); | ||
|
|
||
| // Assert | ||
| Assert.AreEqual("Inserted", TestResults.GetResult("FakePerson")); |
There was a problem hiding this comment.
There is problem using TestResults for this test. It's probably due to multiple ConfigureAwait(false) that AsyncLocal is sometimes addressed from different execution contexts.
I'd wire a dedicated variable in the test and a handler to update variable.
Thoughts?
| HookChangedEvents(Model); | ||
| IsBusy = false; | ||
| if (Exception != null) | ||
| Error?.Invoke(); |
There was a problem hiding this comment.
I think the event should provide the exception to the handler as a parameter.
I know the value is a property on the viewmodel, but it would be simpler for the person writing the event handler to just get the exception directly.
|
@rrrooommmaaa thank you for the updates to the PR. We do still need your contributor agreement. |
|
I have just sent it to you via e-mail. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Close #3279