public UmbracoRequestMiddleware(
     ILogger <UmbracoRequestMiddleware> logger,
     IUmbracoContextFactory umbracoContextFactory,
     IRequestCache requestCache,
     IEventAggregator eventAggregator,
     IProfiler profiler,
     IHostingEnvironment hostingEnvironment,
     UmbracoRequestPaths umbracoRequestPaths,
     BackOfficeWebAssets backOfficeWebAssets,
     IOptionsMonitor <SmidgeOptions> smidgeOptions,
     IRuntimeState runtimeState,
     IVariationContextAccessor variationContextAccessor,
     IDefaultCultureAccessor defaultCultureAccessor)
     : this(
         logger,
         umbracoContextFactory,
         requestCache,
         eventAggregator,
         profiler,
         hostingEnvironment,
         umbracoRequestPaths,
         backOfficeWebAssets,
         smidgeOptions,
         runtimeState,
         variationContextAccessor,
         defaultCultureAccessor,
         StaticServiceProvider.Instance.GetRequiredService <IOptions <UmbracoRequestOptions> >())
 {
 }
Example #2
0
 public CommonServices(
     IComponentContext container,
     IApplicationContext appContext,
     ICacheManager cacheManager,
     IRequestCache requestCache,
     SmartDbContext dbContext,
     IStoreContext storeContext,
     IWorkContext workContext,
     IWebHelper webHelper,
     IEventPublisher eventPublisher,
     Lazy <ISettingService> settings,
     ISettingFactory settingFactory,
     ILoggerFactory loggerFactory,
     Lazy <IActivityLogger> activityLogger,
     INotifier notifier,
     IChronometer chronometer)
 {
     _container      = container;
     _appContext     = appContext;
     _cacheManager   = cacheManager;
     _requestCache   = requestCache;
     _dbContext      = dbContext;
     _storeContext   = storeContext;
     _workContext    = workContext;
     _webHelper      = webHelper;
     _eventPublisher = eventPublisher;
     _settings       = settings;
     _settingFactory = settingFactory;
     _loggerFactory  = loggerFactory;
     _activityLogger = activityLogger;
     _notifier       = notifier;
     _chronometer    = chronometer;
 }
Example #3
0
        public CategoryService(IRequestCache requestCache,
                               ICacheManager cache,
                               IRepository <Category> categoryRepository,
                               IRepository <ProductCategory> productCategoryRepository,
                               IRepository <Product> productRepository,
                               IRepository <AclRecord> aclRepository,
                               IRepository <StoreMapping> storeMappingRepository,
                               IWorkContext workContext,
                               IStoreContext storeContext,
                               IEventPublisher eventPublisher,
                               IStoreMappingService storeMappingService,
                               IAclService aclService,
                               ICustomerService customerService,
                               IStoreService storeService,
                               ICatalogSearchService catalogSearchService)
        {
            _requestCache              = requestCache;
            _cache                     = cache;
            _categoryRepository        = categoryRepository;
            _productCategoryRepository = productCategoryRepository;
            _productRepository         = productRepository;
            _aclRepository             = aclRepository;
            _storeMappingRepository    = storeMappingRepository;
            _workContext               = workContext;
            _storeContext              = storeContext;
            _eventPublisher            = eventPublisher;
            _storeMappingService       = storeMappingService;
            _aclService                = aclService;
            _customerService           = customerService;
            _storeService              = storeService;
            _catalogSearchService      = catalogSearchService;

            QuerySettings = DbQuerySettings.Default;
        }
Example #4
0
 public ProductVariantAttributeCombinationHook(
     SmartDbContext db,
     IRequestCache requestCache)
 {
     _db           = db;
     _requestCache = requestCache;
 }
Example #5
0
 public CategoryHook(
     SmartDbContext db,
     IRequestCache requestCache)
 {
     _db           = db;
     _requestCache = requestCache;
 }
        public ShoppingCartService(
            SmartDbContext db,
            IWorkContext workContext,
            IStoreContext storeContext,
            IRequestCache requestCache,
            IEventPublisher eventPublisher,
            ICurrencyService currencyService,
            IShoppingCartValidator cartValidator,
            IOrderCalculationService orderCalculationService,
            IProductAttributeMaterializer productAttributeMaterializer,
            ICheckoutAttributeMaterializer checkoutAttributeMaterializer)
        {
            _db              = db;
            _workContext     = workContext;
            _storeContext    = storeContext;
            _requestCache    = requestCache;
            _eventPublisher  = eventPublisher;
            _currencyService = currencyService;
            _cartValidator   = cartValidator;
            _productAttributeMaterializer  = productAttributeMaterializer;
            _checkoutAttributeMaterializer = checkoutAttributeMaterializer;
            _orderCalculationService       = orderCalculationService;

            T = NullLocalizer.Instance;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UmbracoRequestMiddleware"/> class.
        /// </summary>
        public UmbracoRequestMiddleware(
            ILogger <UmbracoRequestMiddleware> logger,
            IUmbracoContextFactory umbracoContextFactory,
            IRequestCache requestCache,
            IEventAggregator eventAggregator,
            IProfiler profiler,
            IHostingEnvironment hostingEnvironment,
            UmbracoRequestPaths umbracoRequestPaths,
            BackOfficeWebAssets backOfficeWebAssets,
            IOptionsMonitor <SmidgeOptions> smidgeOptions,
            IRuntimeState runtimeState,
            IVariationContextAccessor variationContextAccessor,
            IDefaultCultureAccessor defaultCultureAccessor,
            IOptions <UmbracoRequestOptions> umbracoRequestOptions)
        {
            _logger = logger;
            _umbracoContextFactory    = umbracoContextFactory;
            _requestCache             = requestCache;
            _eventAggregator          = eventAggregator;
            _hostingEnvironment       = hostingEnvironment;
            _umbracoRequestPaths      = umbracoRequestPaths;
            _backOfficeWebAssets      = backOfficeWebAssets;
            _runtimeState             = runtimeState;
            _variationContextAccessor = variationContextAccessor;
            _defaultCultureAccessor   = defaultCultureAccessor;
            _umbracoRequestOptions    = umbracoRequestOptions;
            _smidgeOptions            = smidgeOptions.CurrentValue;
            _profiler = profiler as WebProfiler; // Ignore if not a WebProfiler

            smidgeOptions.OnChange(x => _smidgeOptions = x);
        }
Example #8
0
 public static AppCaches Create(IRequestCache requestCache)
 {
     return(new AppCaches(
                new DeepCloneAppCache(new ObjectCacheAppCache()),
                requestCache,
                new IsolatedCaches(type => new DeepCloneAppCache(new ObjectCacheAppCache()))));
 }
Example #9
0
 public ManufacturerHook(
     SmartDbContext db,
     IRequestCache requestCache)
 {
     _db           = db;
     _requestCache = requestCache;
 }
Example #10
0
 public GeoCountryLookup(IWebHelper webHelper, IRequestCache requestCache, ICacheManager cache, ICountryService countryService)
 {
     this._webHelper      = webHelper;
     this._requestCache   = requestCache;
     this._cache          = cache;
     this._countryService = countryService;
 }
        public ProductAttributeService(
            IRequestCache requestCache,
            IRepository <ProductAttribute> productAttributeRepository,
            IRepository <ProductAttributeOption> productAttributeOptionRepository,
            IRepository <ProductAttributeOptionsSet> productAttributeOptionsSetRepository,
            IRepository <ProductVariantAttribute> productVariantAttributeRepository,
            IRepository <ProductVariantAttributeCombination> pvacRepository,
            IRepository <ProductVariantAttributeValue> productVariantAttributeValueRepository,
            IRepository <ProductBundleItemAttributeFilter> productBundleItemAttributeFilterRepository,
            ILocalizedEntityService localizedEntityService,
            IEventPublisher eventPublisher,
            IPictureService pictureService)
        {
            _requestCache = requestCache;
            _productAttributeRepository           = productAttributeRepository;
            _productAttributeOptionRepository     = productAttributeOptionRepository;
            _productAttributeOptionsSetRepository = productAttributeOptionsSetRepository;
            _productVariantAttributeRepository    = productVariantAttributeRepository;
            _pvacRepository = pvacRepository;
            _productVariantAttributeValueRepository     = productVariantAttributeValueRepository;
            _productBundleItemAttributeFilterRepository = productBundleItemAttributeFilterRepository;
            _localizedEntityService = localizedEntityService;
            _eventPublisher         = eventPublisher;
            _pictureService         = pictureService;

            T = NullLocalizer.Instance;
        }
 public RpcClient(Uri uri, Uri streamingUri, IRequestCache cache, IRequestFactory requestFactory,IStreamingConnectionFactory streamingConnectionFactory,
                  Dictionary<string, IThrottedRequestQueue> throttleScopes, int retryCount)
     : base(uri, cache, requestFactory, throttleScopes, retryCount)
 {
     _streamingConnectionFactory = streamingConnectionFactory;
     _streamingUri = streamingUri;
 }
Example #13
0
    /// <summary>
    ///     Retrieve the id assigned to the currently-executing HTTP request, if any.
    /// </summary>
    /// <param name="requestId">The request id.</param>
    /// <param name="requestCache"></param>
    /// <returns><c>true</c> if there is a request in progress; <c>false</c> otherwise.</returns>
    public static bool TryGetCurrentHttpRequestId(out Guid?requestId, IRequestCache requestCache)
    {
        var requestIdItem = requestCache.Get(RequestIdItemName, () => Guid.NewGuid());

        requestId = (Guid?)requestIdItem;

        return(true);
    }
Example #14
0
        public AppProvider(IGrainFactory grainFactory, IRequestCache requestCache)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(requestCache, nameof(requestCache));

            this.grainFactory = grainFactory;
            this.requestCache = requestCache;
        }
Example #15
0
 public BadUserInputFilter(MasterHub.MethodDomains methodDomains, ISessionRepo sessionRepo,
                           ILogger <BadUserInputFilter> logger, IRequestCache requestCache)
 {
     _methodDomains = methodDomains;
     _sessionRepo   = sessionRepo;
     _logger        = logger;
     _requestCache  = requestCache;
 }
Example #16
0
 public CustomerPlanService(IRepository <CustomerPlan> customerPlanRepository,
                            IRepository <StoreMapping> storeMappingRepository,
                            IRepository <AclRecord> aclRepository,
                            IWorkContext workContext,
                            IRequestCache requestCache)
 {
     _customerPlanRepository = customerPlanRepository;
     _requestCache           = requestCache;
 }
Example #17
0
 public AssetEnricher(ITagService tagService, IEnumerable <IAssetMetadataSource> assetMetadataSources, IRequestCache requestCache,
                      IUrlGenerator urlGenerator, IJsonSerializer jsonSerializer)
 {
     this.tagService           = tagService;
     this.assetMetadataSources = assetMetadataSources;
     this.requestCache         = requestCache;
     this.urlGenerator         = urlGenerator;
     this.jsonSerializer       = jsonSerializer;
 }
 public ProductAttributeParser(
     IProductAttributeService productAttributeService,
     IRepository <ProductVariantAttributeCombination> pvacRepository,
     IRequestCache requestCache)
 {
     _productAttributeService = productAttributeService;
     _pvacRepository          = pvacRepository;
     _requestCache            = requestCache;
 }
Example #19
0
 public TransactionService(IRepository <Transaction> transactionRepository,
                           IRepository <StoreMapping> storeMappingRepository,
                           IRepository <AclRecord> aclRepository,
                           IWorkContext workContext,
                           IRequestCache requestCache)
 {
     _transactionRepository = transactionRepository;
     _requestCache          = requestCache;
 }
Example #20
0
        public ResolveReferences(Lazy <IContentQueryService> contentQuery, IRequestCache requestCache)
        {
            Guard.NotNull(contentQuery, nameof(contentQuery));
            Guard.NotNull(requestCache, nameof(requestCache));

            this.contentQuery = contentQuery;

            this.requestCache = requestCache;
        }
 public TelerikLocalizationServiceFactory(
     IWorkContext workContext,
     Services.Localization.ILocalizationService localizationService,
     IRequestCache requestCache)
 {
     _workContext         = workContext;
     _localizationService = localizationService;
     _requestCache        = requestCache;
 }
        public RouteValueDictionaryFactory(
            IRequestCache requestCache
            )
        {
            if (requestCache == null)
                throw new ArgumentNullException("requestCache");

            this.requestCache = requestCache;
        }
Example #23
0
 public WidgetService(
     WidgetSettings widgetSettings,
     IProviderManager providerManager,
     IRequestCache requestCache)
 {
     _widgetSettings  = widgetSettings;
     _providerManager = providerManager;
     _requestCache    = requestCache;
 }
Example #24
0
        public RuleEnricher(IRuleEventRepository ruleEventRepository, IRequestCache requestCache)
        {
            Guard.NotNull(ruleEventRepository, nameof(ruleEventRepository));
            Guard.NotNull(requestCache, nameof(requestCache));

            this.ruleEventRepository = ruleEventRepository;

            this.requestCache = requestCache;
        }
Example #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AppCaches"/> with cache providers.
 /// </summary>
 public AppCaches(
     IAppPolicyCache runtimeCache,
     IRequestCache requestCache,
     IsolatedCaches isolatedCaches)
 {
     RuntimeCache   = runtimeCache ?? throw new ArgumentNullException(nameof(runtimeCache));
     RequestCache   = requestCache ?? throw new ArgumentNullException(nameof(requestCache));
     IsolatedCaches = isolatedCaches ?? throw new ArgumentNullException(nameof(isolatedCaches));
 }
Example #26
0
        public ResolveAssets(IUrlGenerator urlGenerator, IAssetQueryService assetQuery, IRequestCache requestCache)
        {
            Guard.NotNull(urlGenerator);
            Guard.NotNull(assetQuery);
            Guard.NotNull(requestCache);

            this.urlGenerator = urlGenerator;
            this.assetQuery   = assetQuery;
            this.requestCache = requestCache;
        }
Example #27
0
        public AssetEnricher(ITagService tagService, IEnumerable <IAssetMetadataSource> assetMetadataSources, IRequestCache requestCache)
        {
            Guard.NotNull(tagService, nameof(tagService));
            Guard.NotNull(assetMetadataSources, nameof(assetMetadataSources));
            Guard.NotNull(requestCache, nameof(requestCache));

            this.tagService           = tagService;
            this.assetMetadataSources = assetMetadataSources;
            this.requestCache         = requestCache;
        }
 public SiteMapFactoryContainer(
     ConfigurationSettings settings,
     IMvcContextFactory mvcContextFactory,
     IUrlPath urlPath)
 {
     this.settings = settings;
     this.mvcContextFactory = mvcContextFactory;
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.urlPath = urlPath;
 }
        public RouteValueDictionaryFactory(
            IRequestCache requestCache
            )
        {
            if (requestCache == null)
            {
                throw new ArgumentNullException("requestCache");
            }

            this.requestCache = requestCache;
        }
Example #30
0
 public static void AddCacheHeaders(this Context context, IRequestCache cache)
 {
     cache.AddHeader(HeaderFlatten);
     cache.AddHeader(HeaderLanguages);
     cache.AddHeader(HeaderNoCleanup);
     cache.AddHeader(HeaderNoEnrichment);
     cache.AddHeader(HeaderNoResolveLanguages);
     cache.AddHeader(HeaderResolveFlow);
     cache.AddHeader(HeaderResolveUrls);
     cache.AddHeader(HeaderUnpublished);
 }
        /// <summary>
        /// Constructor of the api client.
        /// </summary>
        /// <param name="authToken">The jwt bearer token used to authorize protected requests</param>
        /// <param name="requestCache">The request caching method used to cache requests. If null, InMemoryRequestCache is used.</param>
        public PUBGApiClient(string authToken, IRequestCache requestCache = null)
        {
            AuthToken    = authToken;
            RequestCache = requestCache;

            //Use InMemoryRequestCache if not supplied
            if (RequestCache == null)
            {
                RequestCache = new InMemoryRequestCache();
            }
        }
Example #32
0
 public SchemasOpenApiGenerator(
     IUrlGenerator urlGenerator,
     OpenApiDocumentGeneratorSettings schemaSettings,
     OpenApiSchemaGenerator schemaGenerator,
     IRequestCache requestCache)
 {
     this.urlGenerator    = urlGenerator;
     this.schemaSettings  = schemaSettings;
     this.schemaGenerator = schemaGenerator;
     this.requestCache    = requestCache;
 }
 public ThemeVariablesService(
     IRepository <ThemeVariable> rsVariables,
     IThemeRegistry themeRegistry,
     IRequestCache requestCache,
     IEventPublisher eventPublisher)
 {
     this._rsVariables    = rsVariables;
     this._themeRegistry  = themeRegistry;
     this._requestCache   = requestCache;
     this._eventPublisher = eventPublisher;
 }
        public JsonToDictionaryDeserializer(
            IJavaScriptSerializer javaScriptSerializer,
            IMvcContextFactory mvcContextFactory
            )
        {
            if (javaScriptSerializer == null)
                throw new ArgumentNullException("javaScriptSerializer");
            if (mvcContextFactory == null)
                throw new ArgumentNullException("mvcContextFactory");

            this.javaScriptSerializer = javaScriptSerializer;
            this.requestCache = mvcContextFactory.GetRequestCache();
        }
 public SiteMapNodeFactoryContainer(
     ConfigurationSettings settings,
     IMvcContextFactory mvcContextFactory,
     IUrlPath urlPath)
 {
     this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName);
     this.settings = settings;
     this.mvcContextFactory = mvcContextFactory;
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.urlPath = urlPath;
     this.dynamicNodeProviders = this.ResolveDynamicNodeProviders();
     this.siteMapNodeUrlResolvers = this.ResolveSiteMapNodeUrlResolvers();
     this.siteMapNodeVisibilityProviders = this.ResolveSiteMapNodeVisibilityProviders(settings.DefaultSiteMapNodeVisibiltyProvider);
 }
        public RequestCacheableSiteMap(
            ISiteMapPluginProvider pluginProvider,
            IMvcContextFactory mvcContextFactory,
            ISiteMapChildStateFactory siteMapChildStateFactory,
            IUrlPath urlPath,
            ISiteMapSettings siteMapSettings,
            IRequestCache requestCache
            )
            : base(pluginProvider, mvcContextFactory, siteMapChildStateFactory, urlPath, siteMapSettings)
        {
            if (requestCache == null)
                throw new ArgumentNullException("requestCache");

            this.requestCache = requestCache;
        }
 public SiteMapNodeFactoryContainer(
     ConfigurationSettings settings,
     IMvcContextFactory mvcContextFactory,
     IUrlPath urlPath)
 {
     this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName);
     this.settings = settings;
     this.mvcContextFactory = mvcContextFactory;
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.urlPath = urlPath;
     this.assemblyProvider = new AttributeAssemblyProvider(settings.IncludeAssembliesForScan, settings.ExcludeAssembliesForScan);
     this.mvcSiteMapNodeAttributeProvider = new MvcSiteMapNodeAttributeDefinitionProvider();
     this.dynamicNodeProviders = this.ResolveDynamicNodeProviders();
     this.siteMapNodeUrlResolvers = this.ResolveSiteMapNodeUrlResolvers();
     this.siteMapNodeVisibilityProviders = this.ResolveSiteMapNodeVisibilityProviders(settings.DefaultSiteMapNodeVisibiltyProvider);
 }
        public AttributeDictionaryFactory(
            IRequestCache requestCache,
            IReservedAttributeNameProvider reservedAttributeNameProvider,
            IJsonToDictionaryDeserializer jsonToDictionaryDeserializer
            )
        {
            if (requestCache == null)
                throw new ArgumentNullException("requestCache");
            if (reservedAttributeNameProvider == null)
                throw new ArgumentNullException("reservedAttributeNameProvider");
            if (jsonToDictionaryDeserializer == null)
                throw new ArgumentNullException("jsonToDictionaryDeserializer");

            this.requestCache = requestCache;
            this.reservedAttributeNameProvider = reservedAttributeNameProvider;
            this.jsonToDictionaryDeserializer = jsonToDictionaryDeserializer;
        }
 public SiteMapLoaderContainer(ConfigurationSettings settings)
 {
     // Singleton instances
     if (settings.EnableSiteMapFile)
     {
         this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName);
     }
     this.mvcContextFactory = new MvcContextFactory();
     #if NET35
     this.siteMapCache = new SiteMapCache(new AspNetCacheProvider<ISiteMap>(this.mvcContextFactory));
     #else
     this.siteMapCache = new SiteMapCache(new RuntimeCacheProvider<ISiteMap>(System.Runtime.Caching.MemoryCache.Default));
     #endif
     this.cacheDependency = this.ResolveCacheDependency(settings);
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.bindingFactory = new BindingFactory();
     this.bindingProvider = new BindingProvider(this.bindingFactory, this.mvcContextFactory);
     this.urlPath = new UrlPath(this.mvcContextFactory, this.bindingProvider);
     this.siteMapCacheKeyGenerator = new SiteMapCacheKeyGenerator(this.mvcContextFactory);
     this.siteMapCacheKeyToBuilderSetMapper = new SiteMapCacheKeyToBuilderSetMapper();
     this.reservedAttributeNameProvider = new ReservedAttributeNameProvider(settings.AttributesToIgnore);
     var siteMapNodeFactoryContainer = new SiteMapNodeFactoryContainer(settings, this.mvcContextFactory, this.urlPath, this.reservedAttributeNameProvider);
     this.siteMapNodeToParentRelationFactory = new SiteMapNodeToParentRelationFactory();
     this.nodeKeyGenerator = new NodeKeyGenerator();
     this.siteMapNodeFactory = siteMapNodeFactoryContainer.ResolveSiteMapNodeFactory();
     this.siteMapNodeCreatorFactory = this.ResolveSiteMapNodeCreatorFactory();
     this.cultureContextFactory = new CultureContextFactory();
     this.dynamicSiteMapNodeBuilderFactory = new DynamicSiteMapNodeBuilderFactory(this.siteMapNodeCreatorFactory, this.cultureContextFactory);
     this.siteMapHierarchyBuilder = new SiteMapHierarchyBuilder();
     this.siteMapNodeHelperFactory = this.ResolveSiteMapNodeHelperFactory();
     this.siteMapNodeVisitor = this.ResolveSiteMapNodeVisitor(settings);
     this.siteMapXmlNameProvider = new SiteMapXmlNameProvider();
     this.attributeAssemblyProviderFactory = new AttributeAssemblyProviderFactory();
     this.mvcSiteMapNodeAttributeDefinitionProvider = new MvcSiteMapNodeAttributeDefinitionProvider();
     this.siteMapNodeProvider = this.ResolveSiteMapNodeProvider(settings);
     this.siteMapBuiderSetStrategy = this.ResolveSiteMapBuilderSetStrategy(settings);
     var siteMapFactoryContainer = new SiteMapFactoryContainer(settings, this.mvcContextFactory, this.urlPath);
     this.siteMapFactory = siteMapFactoryContainer.ResolveSiteMapFactory();
     this.siteMapCreator = new SiteMapCreator(this.siteMapCacheKeyToBuilderSetMapper, this.siteMapBuiderSetStrategy, this.siteMapFactory);
 }
 public SiteMapNodeFactoryContainer(
     ConfigurationSettings settings,
     IMvcContextFactory mvcContextFactory,
     IUrlPath urlPath,
     IReservedAttributeNameProvider reservedAttributeNameProvider)
 {
     if (settings.EnableSiteMapFile)
     {
         this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName);
     }
     this.settings = settings;
     this.mvcContextFactory = mvcContextFactory;
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.urlPath = urlPath;
     this.reservedAttributeNameProvider = reservedAttributeNameProvider;
     this.javaScriptSerializer = new JavaScriptSerializerAdapter();
     this.jsonToDictionaryDeserializer = new JsonToDictionaryDeserializer(this.javaScriptSerializer, this.mvcContextFactory);
     this.assemblyProvider = new AttributeAssemblyProvider(settings.IncludeAssembliesForScan, settings.ExcludeAssembliesForScan);
     this.mvcSiteMapNodeAttributeProvider = new MvcSiteMapNodeAttributeDefinitionProvider();
     this.dynamicNodeProviders = this.ResolveDynamicNodeProviders();
     this.siteMapNodeUrlResolvers = this.ResolveSiteMapNodeUrlResolvers();
     this.siteMapNodeVisibilityProviders = this.ResolveSiteMapNodeVisibilityProviders(settings.DefaultSiteMapNodeVisibiltyProvider);
 }
 public SiteMapLoaderContainer(ConfigurationSettings settings)
 {
     // Singleton instances
     this.absoluteFileName = HostingEnvironment.MapPath(settings.SiteMapFileName);
     this.mvcContextFactory = new MvcContextFactory();
     #if NET35
     this.siteMapCache = new SiteMapCache(new AspNetCacheProvider<ISiteMap>(this.mvcContextFactory));
     #else
     this.siteMapCache = new SiteMapCache(new RuntimeCacheProvider<ISiteMap>(System.Runtime.Caching.MemoryCache.Default));
     #endif
     this.requestCache = this.mvcContextFactory.GetRequestCache();
     this.urlPath = new UrlPath(this.mvcContextFactory);
     this.siteMapCacheKeyGenerator = new SiteMapCacheKeyGenerator(this.mvcContextFactory);
     this.siteMapCacheKeyToBuilderSetMapper = new SiteMapCacheKeyToBuilderSetMapper();
     this.nodeKeyGenerator = new NodeKeyGenerator();
     var siteMapNodeFactoryContainer = new SiteMapNodeFactoryContainer(settings, this.mvcContextFactory, this.urlPath);
     this.siteMapNodeFactory = siteMapNodeFactoryContainer.ResolveSiteMapNodeFactory();
     this.siteMapXmlNameProvider = new SiteMapXmlNameProvider();
     this.dynamicNodeBuilder = new DynamicNodeBuilder(this.nodeKeyGenerator, this.siteMapNodeFactory);
     this.siteMapBuiderSetStrategy = this.ResolveSiteMapBuilderSetStrategy(settings);
     var siteMapFactoryContainer = new SiteMapFactoryContainer(settings, this.mvcContextFactory, this.urlPath);
     this.siteMapFactory = siteMapFactoryContainer.ResolveSiteMapFactory();
     this.siteMapCreator = new SiteMapCreator(this.siteMapCacheKeyToBuilderSetMapper, this.siteMapBuiderSetStrategy, this.siteMapFactory);
 }
Example #42
0
 public RequestLogger(IRequestCache cache, IRequestCollector collector)
 {
     _cache = cache;
     _collector = collector;
 }
Example #43
0
 public Client(Uri uri, IRequestCache cache, IRequestFactory requestFactory, Dictionary<string, IThrottedRequestQueue> throttleScopes, int retryCount)
     : base(uri,cache, requestFactory, throttleScopes, retryCount)
 {
 }
Example #44
0
 public InspectRHub()
 {
     _requestCache = new RequestCache();
     _dbContext = new InspectRContext();
     _service = new InspectRService(_dbContext);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="apiKey"></param>
 /// <param name="uri"></param>
 /// <param name="cache"></param>
 /// <param name="requestFactory"></param>
 /// <param name="throttleScopes"></param>
 /// <param name="retryCount"></param>
 public StackExchangeClient(string apiKey, Uri uri, IRequestCache cache, IRequestFactory requestFactory,
                        Dictionary<string, IThrottedRequestQueue> throttleScopes, int retryCount)
     : base(uri, cache, requestFactory, throttleScopes, retryCount)
 {
     ApiKey = apiKey;
 }