Skip to content

Instantly share code, notes, and snippets.

@dimitrispaxinos
Created April 25, 2015 14:42
Show Gist options
  • Save dimitrispaxinos/edc847c6d03238d08db7 to your computer and use it in GitHub Desktop.
Save dimitrispaxinos/edc847c6d03238d08db7 to your computer and use it in GitHub Desktop.
private IDisableableCommand _addCommand;
public IDisableableCommand AddCommand
{
get
{
if (_addCommand == null)
_addCommand = new DisableableCommandAsync(
AddCommandHandler,
obj => true,
new List<IDisableableCommand>() { RemoveCommand, UpdateCommand });
return _addCommand;
}
}
private async Task AddCommandHandler(object arg)
{
// do time consuming job
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment