public Task HandleAsync(DoSomethingWithCancellationCommand command, CancellationToken cancellationToken = default(CancellationToken)) { if (cancellationToken == null) { throw new TestCommandHandlerException("Cancellation token is null. Please check registration."); } base.HandleAsync(command); return(Task.CompletedTask); }
public Task DoSomethingAsync(DoSomethingWithCancellationCommand command, CancellationToken ctx) { if (ctx == null) { return(Task.FromException(new TestCommandHandlerException("Cancellation token is null. Please check attribute registration."))); } base.HandleAsync(command); return(Task.CompletedTask); }