public Task StopAsync(CancellationToken cancellationToken) { return(_registry.Stop(cancellationToken)); }
public static async Task Stop(this IBusRegistry registry, TimeSpan timeout) { using var cancellationTokenSource = new CancellationTokenSource(timeout); await registry.Stop(cancellationTokenSource.Token).ConfigureAwait(false); }