public MongoDBPublisher(IServiceProvider provider) : base(provider) { _options = provider.GetService <IOptions <MongoDBOptions> >().Value; _client = ServiceProvider.GetRequiredService <IMongoClient>(); }
public MongoDBPublisher(IServiceProvider provider, MongoDBOptions options) : base(provider) { _options = options; _client = ServiceProvider.GetRequiredService <IMongoClient>(); }