Browse Source

refactor.

master
Savorboard 7 years ago
parent
commit
52085b2973
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      src/DotNetCore.CAP/IBootstrapper.Default.cs

+ 2
- 5
src/DotNetCore.CAP/IBootstrapper.Default.cs View File

@@ -25,14 +25,13 @@ namespace DotNetCore.CAP
IOptions<CapOptions> options,
IStorage storage,
IApplicationLifetime appLifetime,
IServiceProvider provider)
IEnumerable<IProcessingServer> servers)
{
_logger = logger;
_appLifetime = appLifetime;
Options = options.Value;
Storage = storage;
Provider = provider;
Servers = Provider.GetServices<IProcessingServer>();
Servers = servers;

_cts = new CancellationTokenSource();
_ctsRegistration = appLifetime.ApplicationStopping.Register(() =>
@@ -55,8 +54,6 @@ namespace DotNetCore.CAP

protected IEnumerable<IProcessingServer> Servers { get; }

public IServiceProvider Provider { get; private set; }

public Task BootstrapAsync()
{
return (_bootstrappingTask = BootstrapTaskAsync());


Loading…
Cancel
Save