public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider) { Guard.NotNull(appProvider, nameof(appProvider)); collectionAll = new MongoContentCollection("States_Contents_All3", database, appProvider); collectionPublished = new MongoContentCollection("States_Contents_Published3", database, appProvider); this.appProvider = appProvider; }
public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider) { collectionAll = new MongoContentCollection("States_Contents_All3", database, appProvider, ReadPreference.Primary); collectionPublished = new MongoContentCollection("States_Contents_Published3", database, appProvider, ReadPreference.Secondary); this.appProvider = appProvider; }
public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider, IJsonSerializer serializer, ITextIndexer indexer, TypeNameRegistry typeNameRegistry) { Guard.NotNull(appProvider, nameof(appProvider)); Guard.NotNull(serializer, nameof(serializer)); Guard.NotNull(indexer, nameof(indexer)); Guard.NotNull(typeNameRegistry, nameof(typeNameRegistry)); this.appProvider = appProvider; this.indexer = indexer; this.serializer = serializer; typeAssetDeleted = typeNameRegistry.GetName <AssetDeleted>(); typeContentDeleted = typeNameRegistry.GetName <ContentDeleted>(); contents = new MongoContentCollection(database, serializer, appProvider); }
public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider, ITextIndex indexer, IJsonSerializer serializer) { Guard.NotNull(appProvider, nameof(appProvider)); Guard.NotNull(serializer, nameof(serializer)); this.appProvider = appProvider; converter = new DataConverter(serializer); collectionAll = new MongoContentCollection( "States_Contents_All2", database, appProvider, indexer, converter); collectionPublished = new MongoContentCollection( "States_Contents_Published2", database, appProvider, indexer, converter); }