public void Handle(DoSomethingForSpecifiedDurationCommand command) { Task.Delay(command.DurationInMilliSeconds).ContinueWith(t => { base.Handle(command); }); }
public async Task HandleAsync(DoSomethingForSpecifiedDurationCommand command, CancellationToken cancellationToken = default(CancellationToken)) { await Task.Delay(command.DurationInMilliSeconds, cancellationToken); base.HandleAsync(command); }
public async Task DoSomethingAsync(DoSomethingForSpecifiedDurationCommand command, CancellationToken ctx) { await Task.Delay(command.DurationInMilliSeconds, ctx); base.Handle(command); }