Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UmbracoRouteValueTransformer"/> class.
        /// </summary>
        public UmbracoRouteValueTransformer(
            ILogger <UmbracoRouteValueTransformer> logger,
            IUmbracoContextAccessor umbracoContextAccessor,
            IPublishedRouter publishedRouter,
            IOptions <GlobalSettings> globalSettings,
            IHostingEnvironment hostingEnvironment,
            IRuntimeState runtime,
            IUmbracoRouteValuesFactory routeValuesFactory,
            IRoutableDocumentFilter routableDocumentFilter,
            IDataProtectionProvider dataProtectionProvider,
            IControllerActionSearcher controllerActionSearcher,
            IEventAggregator eventAggregator,
            IPublicAccessRequestHandler publicAccessRequestHandler)
        {
            if (globalSettings is null)
            {
                throw new ArgumentNullException(nameof(globalSettings));
            }

            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
            _umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
            _publishedRouter        = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter));
            _globalSettings         = globalSettings.Value;
            _hostingEnvironment     = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
            _runtime                    = runtime ?? throw new ArgumentNullException(nameof(runtime));
            _routeValuesFactory         = routeValuesFactory ?? throw new ArgumentNullException(nameof(routeValuesFactory));
            _routableDocumentFilter     = routableDocumentFilter ?? throw new ArgumentNullException(nameof(routableDocumentFilter));
            _dataProtectionProvider     = dataProtectionProvider;
            _controllerActionSearcher   = controllerActionSearcher;
            _eventAggregator            = eventAggregator;
            _publicAccessRequestHandler = publicAccessRequestHandler;
        }
Пример #2
0
 public UmbracoRouteValueTransformer(
     ILogger <UmbracoRouteValueTransformer> logger,
     IUmbracoContextAccessor umbracoContextAccessor,
     IPublishedRouter publishedRouter,
     IOptions <GlobalSettings> globalSettings,
     IHostingEnvironment hostingEnvironment,
     IRuntimeState runtime,
     IUmbracoRouteValuesFactory routeValuesFactory,
     IRoutableDocumentFilter routableDocumentFilter,
     IDataProtectionProvider dataProtectionProvider,
     IControllerActionSearcher controllerActionSearcher,
     IEventAggregator eventAggregator,
     IPublicAccessRequestHandler publicAccessRequestHandler)
     : this(logger, umbracoContextAccessor, publishedRouter, runtime, routeValuesFactory, routableDocumentFilter, dataProtectionProvider, controllerActionSearcher, publicAccessRequestHandler)
 {
 }
Пример #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="UmbracoRouteValueTransformer" /> class.
 /// </summary>
 public UmbracoRouteValueTransformer(
     ILogger <UmbracoRouteValueTransformer> logger,
     IUmbracoContextAccessor umbracoContextAccessor,
     IPublishedRouter publishedRouter,
     IRuntimeState runtime,
     IUmbracoRouteValuesFactory routeValuesFactory,
     IRoutableDocumentFilter routableDocumentFilter,
     IDataProtectionProvider dataProtectionProvider,
     IControllerActionSearcher controllerActionSearcher,
     IPublicAccessRequestHandler publicAccessRequestHandler)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _umbracoContextAccessor =
         umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
     _publishedRouter        = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter));
     _runtime                = runtime ?? throw new ArgumentNullException(nameof(runtime));
     _routeValuesFactory     = routeValuesFactory ?? throw new ArgumentNullException(nameof(routeValuesFactory));
     _routableDocumentFilter =
         routableDocumentFilter ?? throw new ArgumentNullException(nameof(routableDocumentFilter));
     _dataProtectionProvider     = dataProtectionProvider;
     _controllerActionSearcher   = controllerActionSearcher;
     _publicAccessRequestHandler = publicAccessRequestHandler;
 }