Пример #1
0
 public MongoDBPublisher(IServiceProvider provider) : base(provider)
 {
     _options = provider.GetService <IOptions <MongoDBOptions> >().Value;
     _client  = ServiceProvider.GetRequiredService <IMongoClient>();
 }
Пример #2
0
 public MongoDBPublisher(IServiceProvider provider, MongoDBOptions options)
     : base(provider)
 {
     _options = options;
     _client  = ServiceProvider.GetRequiredService <IMongoClient>();
 }