Пример #1
0
 public ValidationResult Validate(CommandContext context, CommandSettings settings)
 {
     return(ValidationResult.Success());
 }
Пример #2
0
 public Task <int> Execute(CommandContext context, CommandSettings settings)
 {
     return(Task.FromResult(_func(context, settings)));
 }
Пример #3
0
 /// <inheritdoc/>
 Task <int> ICommand.Execute(CommandContext context, CommandSettings settings)
 {
     return(ExecuteAsync(context));
 }
Пример #4
0
 /// <inheritdoc/>
 Task <int> ICommand.Execute(CommandContext context, CommandSettings settings)
 {
     return(Task.FromResult(Execute(context)));
 }
Пример #5
0
 /// <inheritdoc/>
 Task <int> ICommand.Execute(CommandContext context, CommandSettings settings)
 {
     Debug.Assert(settings is TSettings, "Command settings is of unexpected type.");
     return(Task.FromResult(Execute(context, (TSettings)settings)));
 }
Пример #6
0
 /// <inheritdoc/>
 ValidationResult ICommand.Validate(CommandContext context, CommandSettings settings)
 {
     return(Validate(context, (TSettings)settings));
 }