Пример #1
0
 public AsyncRelayCommand(Func <T?, CancellationToken, Task> cancelableExecute)
 {
     _relayCommand = new Microsoft.Toolkit.Mvvm.Input.AsyncRelayCommand <T>(cancelableExecute);
     _relayCommand.PropertyChanged += (_, args) => PropertyChanged?.Invoke(this, args);
 }
Пример #2
0
 public AsyncRelayCommand(Func <T?, Task> execute)
 {
     _relayCommand = new Microsoft.Toolkit.Mvvm.Input.AsyncRelayCommand <T>(execute);
     _relayCommand.PropertyChanged += (_, args) => PropertyChanged?.Invoke(this, args);
 }