public QueueManager(DynamicDataStoreFactory dynamicDataStoreFactory, IHandler handler) { if (dynamicDataStoreFactory == null) throw new ArgumentNullException("dynamicDataStoreFactory"); if (handler == null) throw new ArgumentNullException("handler"); _dynamicDataStoreFactory = dynamicDataStoreFactory; _handler = handler; _queueStore = _dynamicDataStoreFactory .GetStore(typeof (QueueItem)); _errorQueueStore = _dynamicDataStoreFactory .GetStore(typeof(ErrorQueueItem)); }
private DynamicDataStore GetRoutingFacetNameStore() { const string routingFacetNames = "RoutingFacetNames"; return(_dynamicDataStoreFactory.GetStore(routingFacetNames) ?? _dynamicDataStoreFactory.CreateStore(routingFacetNames, typeof(RouteFacetModel))); }
/// <summary> /// Loads the Disqus configuration from DDS. /// </summary> /// <returns></returns> public IConfiguration Load() { ConfigurationEntity settingsEntity; using (var store = _storeFactory.GetStore(typeof(ConfigurationEntity)) ?? _storeFactory.CreateStore(typeof(ConfigurationEntity))) { settingsEntity = store.Items <ConfigurationEntity>().FirstOrDefault(); } if (settingsEntity == null) { return(CreateDefaultConfiguration()); } var settings = CreateConfiguration(settingsEntity); // TODO: cache settings? return(settings); }
public PageObjectCommentRepository(PageObjectManagerFactory pageObjectManagerFactory, DynamicDataStoreFactory dynamicDataStoreFactory) { this.pageObjectManagerFactory = pageObjectManagerFactory; this.commentStore = dynamicDataStoreFactory.GetStore(typeof(PageComment)); }
private DynamicDataStore GetStore() { return(_dataStoreFactory.GetStore(typeof(ExternalReviewLinkDds)) ?? _dataStoreFactory.CreateStore(typeof(ExternalReviewLinkDds))); }
public DynamicDataStoreRatingRepository(RatingCalculator ratingCalculator, DynamicDataStoreFactory dynamicDataStoreFactory) { this.ratingCalculator = ratingCalculator; this.ratingStore = dynamicDataStoreFactory.GetStore(typeof(PageRating)); }
private DynamicDataStore GetStore() { return(_dataStoreFactory.GetStore(typeof(ApprovalReview)) ?? _dataStoreFactory.CreateStore(typeof(ApprovalReview))); }
public PageObjectRatingRepository(RatingCalculator ratingCalculator, PageObjectManagerFactory pageObjectManagerFactory, DynamicDataStoreFactory dynamicDataStoreFactory) { this.ratingCalculator = ratingCalculator; this.pageObjectManagerFactory = pageObjectManagerFactory; this.ratingStore = dynamicDataStoreFactory.GetStore(typeof(PageRating)); }
private DynamicDataStore GetStore() { return(_dataStoreFactory.GetStore(typeof(ProjectSettings)) ?? _dataStoreFactory.CreateStore(typeof(ProjectSettings))); }