protected GenericRepositoryAsync(IMongoDbConnector connector, string collectionName) { Connector = connector; CollectionName = collectionName; Collection = Connector.Db.GetCollection <T>(collectionName); CollectionExist = Collection != null; }
/// <summary> /// Установить контекст работы /// </summary> /// <param name="database"></param> /// <param name="collection"></param> public IDocumentStorage SetContext(string database, string collection) { Connector = ResolveService<IMongoDbConnector>(ConnectorName); Connector.DatabaseName = database; Connector.CollectionName = collection; return this; }
public UserService(INotificationService notificationService, IMongoDbConnector mongoDbConnector, IUserRepository userRepository, IRoomRepository roomRepository) { _notificationService = notificationService; _mongoDbConnector = mongoDbConnector; _userRepository = userRepository; _roomRepository = roomRepository; }
protected GenericRepositoryAsync(IMongoDbConnector connector, string collectionName, DeliveryStrategy strategy = null) { Connector = connector; CollectionName = collectionName; Collection = Connector.Db.GetCollection <T>(collectionName); CollectionExist = Collection != null; Strategy = strategy ?? DeliveryStrategy.DefaultDeliveryStrategy(); }
protected GenericRepositoryAsync(IMongoDbConnector connector, string collectionName) : base(connector, collectionName) { }
protected GenericRepositoryAsync(IMongoDbConnector connector) : this(connector, null) { }
public NotificationContext(IMongoDbConnector mongoDbConnector, ITelegramConnectionStringProvider telegramConnectionStringProvider) { _mongoDbConnector = mongoDbConnector; _telegramConnectionStringProvider = telegramConnectionStringProvider; }
public TelegramNotificationProvider(IMongoDbConnector mongoDbConnector, ITelegramConnectionStringProvider telegramConnectionStringProvider) : base(mongoDbConnector) { _telegramConnectionStringProvider = telegramConnectionStringProvider; }
/// <summary> /// /// </summary> /// <param name="mongoDbConnector"></param> /// <param name="localized"></param> public BasketCardRepository(IMongoDbConnector mongoDbConnector, IResponseLocalized localized) : base(mongoDbConnector, localized) { }
/// <summary> /// /// </summary> /// <param name="mongoDbConnector"></param> /// <param name="localized"></param> protected MongoDbRepository(IMongoDbConnector mongoDbConnector, IResponseLocalized localized) { _localized = localized ?? throw new ArgumentNullException(nameof(localized)); _mongoDatabase = mongoDbConnector.MongoDatabase; Collection = _mongoDatabase.GetCollection <T>(collectionName); }
/// <summary> /// Хранилище файлов, базированное на MongoDB /// </summary> public FileStorageMongoDbBased(IMongoDbConnector mongoDbConnector) { Abilities = FileStorageAbilities.Persist; MongoDbConnector = mongoDbConnector; }
public ViberNotificationProvider(IMongoDbConnector mongoDbConnector) : base(mongoDbConnector) { }
public EmailNotificationProvider(IMongoDbConnector mongoDbConnector) : base(mongoDbConnector) { }
protected GenericBucketRepositoryAsync(IMongoDbConnector connector, string collectionName) : base(connector, collectionName) { _bucket = Connector.GetBucket(collectionName); }
/// <summary> /// Дескриптор файла, базированный на MongoDB /// </summary> /// <param name="fileDescriptor">Представление файла</param> /// <param name="mongoDbConnector">Настроенный коннектор к базе</param> public FileDescriptorMongoDbBased(IFileDescriptor fileDescriptor, IMongoDbConnector mongoDbConnector) { Descriptor = fileDescriptor; _mongoDbConnector = mongoDbConnector; }
public NotificationProvider(IMongoDbConnector mongoDbConnector) { _mongoDbConnector = mongoDbConnector; }