diff --git a/src/DotNetCore.CAP/IBootstrapper.Default.cs b/src/DotNetCore.CAP/IBootstrapper.Default.cs index 195916b..e4a75d5 100644 --- a/src/DotNetCore.CAP/IBootstrapper.Default.cs +++ b/src/DotNetCore.CAP/IBootstrapper.Default.cs @@ -25,14 +25,13 @@ namespace DotNetCore.CAP IOptions options, IStorage storage, IApplicationLifetime appLifetime, - IServiceProvider provider) + IEnumerable servers) { _logger = logger; _appLifetime = appLifetime; Options = options.Value; Storage = storage; - Provider = provider; - Servers = Provider.GetServices(); + Servers = servers; _cts = new CancellationTokenSource(); _ctsRegistration = appLifetime.ApplicationStopping.Register(() => @@ -55,8 +54,6 @@ namespace DotNetCore.CAP protected IEnumerable Servers { get; } - public IServiceProvider Provider { get; private set; } - public Task BootstrapAsync() { return (_bootstrappingTask = BootstrapTaskAsync());