Пример #1
0
 public async Task RunAsync(IBootstrap bootstrap, CancellationToken cancellationToken = default)
 {
     using var scope = _serviceProvider.CreateScope();
     try
     {
         await bootstrap.BootstrapAsync(scope.ServiceProvider, _state, cancellationToken);
     }
     finally
     {
         IsCompleted = true;
     }
 }