コード例 #1
0
        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)));
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
 public PageObjectCommentRepository(PageObjectManagerFactory pageObjectManagerFactory, DynamicDataStoreFactory dynamicDataStoreFactory)
 {
     this.pageObjectManagerFactory = pageObjectManagerFactory;
     this.commentStore = dynamicDataStoreFactory.GetStore(typeof(PageComment));
 }
コード例 #5
0
 private DynamicDataStore GetStore()
 {
     return(_dataStoreFactory.GetStore(typeof(ExternalReviewLinkDds)) ?? _dataStoreFactory.CreateStore(typeof(ExternalReviewLinkDds)));
 }
コード例 #6
0
 public DynamicDataStoreRatingRepository(RatingCalculator ratingCalculator, DynamicDataStoreFactory dynamicDataStoreFactory)
 {
     this.ratingCalculator = ratingCalculator;
     this.ratingStore = dynamicDataStoreFactory.GetStore(typeof(PageRating));
 }
コード例 #7
0
 private DynamicDataStore GetStore()
 {
     return(_dataStoreFactory.GetStore(typeof(ApprovalReview)) ?? _dataStoreFactory.CreateStore(typeof(ApprovalReview)));
 }
コード例 #8
0
 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)));
 }