コード例 #1
0
 public MacroRenderer(
     IProfilingLogger profilingLogger,
     ILogger <MacroRenderer> logger,
     IUmbracoContextAccessor umbracoContextAccessor,
     IOptions <ContentSettings> contentSettings,
     ILocalizedTextService textService,
     AppCaches appCaches,
     IMacroService macroService,
     IHostingEnvironment hostingEnvironment,
     ICookieManager cookieManager,
     ISessionManager sessionManager,
     IRequestAccessor requestAccessor,
     PartialViewMacroEngine partialViewMacroEngine,
     IHttpContextAccessor httpContextAccessor)
 {
     _profilingLogger        = profilingLogger ?? throw new ArgumentNullException(nameof(profilingLogger));
     _logger                 = logger;
     _umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
     _contentSettings        = contentSettings.Value ?? throw new ArgumentNullException(nameof(contentSettings));
     _textService            = textService;
     _appCaches              = appCaches ?? throw new ArgumentNullException(nameof(appCaches));
     _macroService           = macroService ?? throw new ArgumentNullException(nameof(macroService));
     _hostingEnvironment     = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
     _cookieManager          = cookieManager;
     _sessionManager         = sessionManager;
     _requestAccessor        = requestAccessor;
     _partialViewMacroEngine = partialViewMacroEngine;
     _httpContextAccessor    = httpContextAccessor;
 }
コード例 #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="PublishedRouter" /> class.
 /// </summary>
 public PublishedRouter(
     IOptionsMonitor <WebRoutingSettings> webRoutingSettings,
     ContentFinderCollection contentFinders,
     IContentLastChanceFinder contentLastChanceFinder,
     IVariationContextAccessor variationContextAccessor,
     IProfilingLogger proflog,
     ILogger <PublishedRouter> logger,
     IPublishedUrlProvider publishedUrlProvider,
     IRequestAccessor requestAccessor,
     IPublishedValueFallback publishedValueFallback,
     IFileService fileService,
     IContentTypeService contentTypeService,
     IUmbracoContextAccessor umbracoContextAccessor,
     IEventAggregator eventAggregator)
 {
     _webRoutingSettings = webRoutingSettings.CurrentValue ??
                           throw new ArgumentNullException(nameof(webRoutingSettings));
     _contentFinders          = contentFinders ?? throw new ArgumentNullException(nameof(contentFinders));
     _contentLastChanceFinder =
         contentLastChanceFinder ?? throw new ArgumentNullException(nameof(contentLastChanceFinder));
     _profilingLogger          = proflog ?? throw new ArgumentNullException(nameof(proflog));
     _variationContextAccessor = variationContextAccessor ??
                                 throw new ArgumentNullException(nameof(variationContextAccessor));
     _logger = logger;
     _publishedUrlProvider   = publishedUrlProvider;
     _requestAccessor        = requestAccessor;
     _publishedValueFallback = publishedValueFallback;
     _fileService            = fileService;
     _contentTypeService     = contentTypeService;
     _umbracoContextAccessor = umbracoContextAccessor;
     _eventAggregator        = eventAggregator;
     webRoutingSettings.OnChange(x => _webRoutingSettings = x);
 }
コード例 #3
0
 public MacroRenderer(
     IProfilingLogger profilingLogger,
     ILogger <MacroRenderer> logger,
     IUmbracoContextAccessor umbracoContextAccessor,
     IOptionsMonitor <ContentSettings> contentSettings,
     ILocalizedTextService textService,
     AppCaches appCaches,
     IMacroService macroService,
     IHostingEnvironment hostingEnvironment,
     ICookieManager cookieManager,
     ISessionManager sessionManager,
     IRequestAccessor requestAccessor,
     PartialViewMacroEngine partialViewMacroEngine,
     IHttpContextAccessor httpContextAccessor)
     : this(
         profilingLogger,
         logger,
         umbracoContextAccessor,
         contentSettings,
         textService,
         appCaches,
         macroService,
         cookieManager,
         sessionManager,
         requestAccessor,
         partialViewMacroEngine,
         httpContextAccessor,
         StaticServiceProvider.Instance.GetRequiredService <IWebHostEnvironment>())
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentFinderByIdPath"/> class.
 /// </summary>
 public ContentFinderByIdPath(
     IOptions <WebRoutingSettings> webRoutingSettings,
     ILogger <ContentFinderByIdPath> logger,
     IRequestAccessor requestAccessor,
     IUmbracoContextAccessor umbracoContextAccessor)
 {
     _webRoutingSettings     = webRoutingSettings.Value ?? throw new System.ArgumentNullException(nameof(webRoutingSettings));
     _logger                 = logger ?? throw new System.ArgumentNullException(nameof(logger));
     _requestAccessor        = requestAccessor ?? throw new System.ArgumentNullException(nameof(requestAccessor));
     _umbracoContextAccessor = umbracoContextAccessor ?? throw new System.ArgumentNullException(nameof(umbracoContextAccessor));
 }
コード例 #5
0
    /// <summary>
    ///     Initializes a new instance of the <see cref="ContentFinderByIdPath" /> class.
    /// </summary>
    public ContentFinderByIdPath(
        IOptionsMonitor <WebRoutingSettings> webRoutingSettings,
        ILogger <ContentFinderByIdPath> logger,
        IRequestAccessor requestAccessor,
        IUmbracoContextAccessor umbracoContextAccessor)
    {
        _webRoutingSettings = webRoutingSettings.CurrentValue ??
                              throw new ArgumentNullException(nameof(webRoutingSettings));
        _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
        _requestAccessor        = requestAccessor ?? throw new ArgumentNullException(nameof(requestAccessor));
        _umbracoContextAccessor =
            umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));

        webRoutingSettings.OnChange(x => _webRoutingSettings = x);
    }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BatchedDatabaseServerMessenger"/> class.
 /// </summary>
 public BatchedDatabaseServerMessenger(
     IMainDom mainDom,
     CacheRefresherCollection cacheRefreshers,
     IServerRoleAccessor serverRoleAccessor,
     ILogger <BatchedDatabaseServerMessenger> logger,
     ISyncBootStateAccessor syncBootStateAccessor,
     IHostingEnvironment hostingEnvironment,
     ICacheInstructionService cacheInstructionService,
     IJsonSerializer jsonSerializer,
     IRequestCache requestCache,
     IRequestAccessor requestAccessor,
     LastSyncedFileManager lastSyncedFileManager,
     IOptions <GlobalSettings> globalSettings)
     : base(mainDom, cacheRefreshers, serverRoleAccessor, logger, true, syncBootStateAccessor, hostingEnvironment, cacheInstructionService, jsonSerializer, lastSyncedFileManager, globalSettings)
 {
     _requestCache    = requestCache;
     _requestAccessor = requestAccessor;
 }
コード例 #7
0
 public void TestTearDown()
 {
     _fakeRequestAccessor = null;
     _requestManager      = null;
 }
コード例 #8
0
 public void TestSetup()
 {
     _fakeRequestAccessor = new FakeRequestAccessor();
     _requestManager      = new RequestManager(_fakeRequestAccessor);
 }
コード例 #9
0
 /// <summary>
 ///  CREATOR: Kaleb Bachert
 ///  CREATED: 2020/2/9
 ///  APPROVER: Jordan Lindo
 ///
 ///  Constructor for instantiating FakeRequestAccessor
 /// </summary>
 /// <remarks>
 /// UPDATER: NA
 /// UPDATED: NA
 /// UPDATE: NA
 ///
 /// </remarks>
 public RequestManagerTests()
 {
     _requestAccessor = new FakeRequestAccessor();
 }
コード例 #10
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ContentFinderByPageIdQuery" /> class.
 /// </summary>
 public ContentFinderByPageIdQuery(IRequestAccessor requestAccessor, IUmbracoContextAccessor umbracoContextAccessor)
 {
     _requestAccessor        = requestAccessor ?? throw new ArgumentNullException(nameof(requestAccessor));
     _umbracoContextAccessor =
         umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
 }
コード例 #11
0
        /// <summary>
        ///  Creator: Kaleb Bachert
        ///  Created: 2/9/2020
        ///  Approver: Zach Behrensmeyer
        ///
        ///  Constructor for passing specific Accessor class
        /// </summary>
        /// <remarks>
        /// Updater: NA
        /// Updated: NA
        /// Update: NA
        ///
        /// </remarks>
        /// <param name="requestAccessor"></param>

        public RequestManager(IRequestAccessor requestAccessor)
        {
            _requestAccessor = requestAccessor;
        }
コード例 #12
0
 /// <summary>
 ///  Creator: Kaleb Bachert
 ///  Created: 2/9/2020
 ///  Approver: Zach Behrensmeyer
 ///
 ///  Default Constructor for instantiating Accessor
 /// </summary>
 /// <remarks>
 /// Updater: NA
 /// Updated: NA
 /// Update: NA
 ///
 /// </remarks>
 public RequestManager()
 {
     _requestAccessor = new RequestAccessor();
 }