Created
August 26, 2020 01:10
-
-
Save felipebaltazar/cc5d39fca9f51c5ffb047423ff3e3e28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public asbtract BaseViewModel : INotifyPropertyChanged | |
{ | |
protected async Task RunBusyAction (Task busyTask) | |
{ | |
if(IsBusy) | |
return; | |
IsBusy = true; | |
try | |
{ | |
await busyTask.ConfigureAwait(false); | |
} | |
finally | |
{ | |
IsBusy = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment