public ApplicationUserStore(Lazy <ApplicationUserStoreCache> userCache, ISystemDocumentStorageFactory documentStorageFactory) { // Lazy, чтобы подписка на изменения кэша пользователей в кластере не создавалась сразу _userCache = userCache; _userStorage = new Lazy <ISystemDocumentStorage <ApplicationUser> >(() => documentStorageFactory.GetStorage <ApplicationUser>()); }
public DocumentHttpService(IDocumentHttpServiceHandlerBase serviceHandler, IDocumentQueryFactory <TDocument> queryFactory, IDocumentStorageFactory storageFactory, ISystemDocumentStorageFactory systemStorageFactory, IBlobStorage blobStorage, IPerformanceLog performanceLog, ILog log) : base(performanceLog, log) { var storage = serviceHandler.AsSystem ? systemStorageFactory.GetStorage <TDocument>(serviceHandler.DocumentType) : storageFactory.GetStorage <TDocument>(serviceHandler.DocumentType); DocumentType = storage.DocumentType; CanGet = serviceHandler.CanGet; CanPost = serviceHandler.CanPost; CanDelete = serviceHandler.CanDelete; _serviceHandler = (IDocumentHttpServiceHandler <TDocument>)serviceHandler; _queryFactory = queryFactory; _blobStorage = blobStorage; _storage = storage; }