You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, sometimes, I want to perform some work after a child viewmodel has closed - even though it does not return a value.
One might argue "hey, just return a value then!" - however, it means that viewmodel needs to derive from MvxViewModel<TInput, TOutput> instead if MvxViewModel, or MvxViewModel.
As I have my own common viewmodel base class (MyProductsViewModelBase : MvxViewModel), I have to repeat all my code multiple times to have a base class which
has no input or output
has an input
has an input and output
It would be much easier, if the IMvxViewModel just had its own CloseCompletionSource to be notified of when it was closed.
Contextualize the feature
Add a TaskCompletionSource<bool> CloseCompletionSource to the IMvxViewModel contract.
Sure, `IMvxViewModelResult<> would then need to have 2 completion sources (a bool one, and a typed on) - small price to pay.
The text was updated successfully, but these errors were encountered:
馃殌 Feature Requests
Currently, it is only possible to block until closure of viewmodel that returns a value:
However, sometimes, I want to perform some work after a child viewmodel has closed - even though it does not return a value.
One might argue "hey, just return a value then!" - however, it means that viewmodel needs to derive from MvxViewModel<TInput, TOutput> instead if MvxViewModel, or MvxViewModel.
As I have my own common viewmodel base class (MyProductsViewModelBase : MvxViewModel), I have to repeat all my code multiple times to have a base class which
It would be much easier, if the IMvxViewModel just had its own
CloseCompletionSource
to be notified of when it was closed.Contextualize the feature
Add a
TaskCompletionSource<bool> CloseCompletionSource
to the IMvxViewModel contract.Sure, `IMvxViewModelResult<> would then need to have 2 completion sources (a bool one, and a typed on) - small price to pay.
The text was updated successfully, but these errors were encountered: