public DefaultOrchardHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IProcessingEngine processingEngine, IExtensionLoaderCoordinator extensionLoaderCoordinator, IExtensionMonitoringCoordinator extensionMonitoringCoordinator, ICacheManager cacheManager, IHostLocalRestart hostLocalRestart, IHttpContextAccessor httpContextAccessor) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _processingEngine = processingEngine; _extensionLoaderCoordinator = extensionLoaderCoordinator; _extensionMonitoringCoordinator = extensionMonitoringCoordinator; _cacheManager = cacheManager; _hostLocalRestart = hostLocalRestart; _httpContextAccessor = httpContextAccessor; _tenantsToRestart = new ContextState <IList <ShellSettings> >("DefaultOrchardHost.TenantsToRestart", () => new List <ShellSettings>()); T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public ShellFeatureUpdater( IShellFeatureStore <ShellFeature> shellFeatureStore, IShellDescriptorManager shellDescriptorManager, IShellDescriptorStore shellDescriptorStore, IHttpContextAccessor httpContextAccessor, IShellContextFactory shellContextFactory, IDataMigrationBuilder migrationBuilder, IRunningShellTable runningShellTable, IOptions <PlatoOptions> platoOptions, ILogger <ShellFeatureUpdater> logger, IFeatureFacade featureFacade, IPlatoHost platoHost) { _platoOptions = platoOptions; _featureFacade = featureFacade; _migrationBuilder = migrationBuilder; _shellDescriptorManager = shellDescriptorManager; _shellDescriptorStore = shellDescriptorStore; _shellFeatureStore = shellFeatureStore; _httpContextAccessor = httpContextAccessor; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _platoHost = platoHost; _logger = logger; }
public static IShellSettings Match( this IRunningShellTable table, HttpContext httpContext, ILogger logger) { var host = string.Empty; HttpRequest httpRequest = null; // use Host header to prevent proxy alteration of the original request try { httpRequest = httpContext.Request; if (httpRequest == null) { return(null); } host = httpRequest.Headers["Host"].ToString(); return(table.Match(host ?? string.Empty, httpRequest.Path)); } catch (Exception e) { var url = host + httpRequest != null ? httpRequest.Path.ToString() : string.Empty; if (logger.IsEnabled(LogLevel.Error)) { logger.LogError(e, $"A problem occurred attempting to match the URL \"{url}\" to a specific tenant. Could not locate matching tenant!"); } // can happen on cloud service for an unknown reason return(null); } }
public HubRoute(string name, string area, int priority, IRunningShellTable runningShellTable) { Priority = priority; Area = area; Name = name; _runningShellTable = runningShellTable; }
public ModularTenantContainerMiddleware(RequestDelegate next, IShellHost shellHost, IRunningShellTable runningShellTable) { base(); this._next = next; this._shellHost = shellHost; this._runningShellTable = runningShellTable; return; }
public DefaultRoutePublisher(RouteCollection routeCollection, ShellSettings shellSettings, IExtensionManager extensionManager, IWebWorkContextAccessor webWorkContextAccessor, IRunningShellTable runningShellTable, IEnumerable <IRoutePublisherEventHandler> routePublisherEventHandlers) { _routeCollection = routeCollection; _shellSettings = shellSettings; _extensionManager = extensionManager; _webWorkContextAccessor = webWorkContextAccessor; _runningShellTable = runningShellTable; _routePublisherEventHandlers = routePublisherEventHandlers; }
public ModularTenantContainerMiddleware( RequestDelegate next, IShellHost shellHost, IRunningShellTable runningShellTable) { _next = next; _shellHost = shellHost; _runningShellTable = runningShellTable; }
public static ShellSettings Match(this IRunningShellTable table, HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException("httpContext"); } V_0 = httpContext.get_Request(); return(table.Match(V_0.get_Host(), V_0.get_Path(), true)); }
public DefaultRoutePublisher(RouteCollection routeCollection, ShellSettings shellSettings, IExtensionManager extensionManager, IWebWorkContextAccessor webWorkContextAccessor, IRunningShellTable runningShellTable, IEnumerable<IRoutePublisherEventHandler> routePublisherEventHandlers) { _routeCollection = routeCollection; _shellSettings = shellSettings; _extensionManager = extensionManager; _webWorkContextAccessor = webWorkContextAccessor; _runningShellTable = runningShellTable; _routePublisherEventHandlers = routePublisherEventHandlers; }
public RoutePublisher( RouteCollection routeCollection, ShellSettings shellSettings, ILifetimeScope shellLifetimeScope, IRunningShellTable runningShellTable) { _routeCollection = routeCollection; _shellSettings = shellSettings; _shellLifetimeScope = shellLifetimeScope; _runningShellTable = runningShellTable; }
public ShellRoute(RouteBase route, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable) { _route = route; _shellSettings = shellSettings; _runningShellTable = runningShellTable; _workContextAccessor = workContextAccessor; if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); Area = route.GetAreaName(); }
public RoutePublisher( RouteCollection routeCollection, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable) { _routeCollection = routeCollection; _shellSettings = shellSettings; _workContextAccessor = workContextAccessor; _runningShellTable = runningShellTable; }
public OrchardContainerMiddleware( RequestDelegate next, IOrchardHost orchardHost, IRunningShellTable runningShellTable, ILoggerFactory loggerFactory) { _next = next; _orchardHost = orchardHost; _runningShellTable = runningShellTable; _logger = loggerFactory.CreateLogger<OrchardContainerMiddleware>(); }
public override ServiceHostBase CreateServiceHost(string constructorString, Uri[] baseAddresses) { IComponentRegistration registration; if (constructorString == null) { throw new ArgumentNullException("constructorString"); } if (constructorString == string.Empty) { throw new ArgumentOutOfRangeException("constructorString"); } if (HostContainer == null) { throw new InvalidOperationException(); } // Create work context IRunningShellTable runningShellTable = HostContainer.Resolve <IRunningShellTable>(); ShellSettings shellSettings = runningShellTable.Match(baseAddresses.First().Host, baseAddresses.First().LocalPath); IBoyingHost BoyingHost = HostContainer.Resolve <IBoyingHost>(); ShellContext shellContext = BoyingHost.GetShellContext(shellSettings); IWorkContextAccessor workContextAccessor = shellContext.LifetimeScope.Resolve <IWorkContextAccessor>(); WorkContext workContext = workContextAccessor.GetContext(); if (workContext == null) { using (IWorkContextScope workContextScope = workContextAccessor.CreateWorkContextScope()) { ILifetimeScope lifetimeScope = workContextScope.Resolve <ILifetimeScope>(); registration = GetRegistration(lifetimeScope, constructorString); } } else { ILifetimeScope lifetimeScope = workContext.Resolve <ILifetimeScope>(); registration = GetRegistration(lifetimeScope, constructorString); } if (registration == null) { throw new InvalidOperationException(); } if (!registration.Activator.LimitType.IsClass) { throw new InvalidOperationException(); } return(CreateServiceHost(workContextAccessor, registration, registration.Activator.LimitType, baseAddresses)); }
public ShellRoute(RouteBase route, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable, Func<IDictionary<string, object>, Task> pipeline) { _route = route; _shellSettings = shellSettings; _runningShellTable = runningShellTable; _pipeline = pipeline; _workContextAccessor = workContextAccessor; if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); Area = route.GetAreaName(); }
public DefaultOrchardHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ILogger<DefaultOrchardHost> logger) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _logger = logger; }
public DefaultOrchardHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ILoggerFactory loggerFactory) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _logger = loggerFactory.CreateLogger <DefaultOrchardHost>(); }
public OpenIdServerConfiguration( ILogger <OpenIdServerConfiguration> logger, IRunningShellTable runningShellTable, ShellSettings shellSettings, IOpenIdServerService serverService) { _logger = logger; _runningShellTable = runningShellTable; _shellSettings = shellSettings; _serverService = serverService; }
public ModularTenantContainerMiddleware( RequestDelegate next, IShellHost orchardHost, IRunningShellTable runningShellTable, ILogger <ModularTenantContainerMiddleware> logger) { _next = next; _orchardHost = orchardHost; _runningShellTable = runningShellTable; _logger = logger; }
public OrchardContainerMiddleware( RequestDelegate next, IOrchardHost orchardHost, IRunningShellTable runningShellTable, ILogger <OrchardContainerMiddleware> logger) { _next = next; _orchardHost = orchardHost; _runningShellTable = runningShellTable; _logger = logger; }
public DefaultPlatoHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ILogger <DefaultPlatoHost> logger) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _logger = logger; }
public PlatoContainerMiddleware( ILogger <PlatoContainerMiddleware> logger, IRunningShellTable runningShellTable, RequestDelegate next, IPlatoHost platoHost) { _runningShellTable = runningShellTable; _platoHost = platoHost; _logger = logger; _next = next; }
public RoutePublisher( RouteCollection routeCollection, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable, IExtensionManager extensionManager) { _routeCollection = routeCollection; _shellSettings = shellSettings; _workContextAccessor = workContextAccessor; _runningShellTable = runningShellTable; _extensionManager = extensionManager; }
public ShellRoute(RouteBase route, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable) { _route = route; _shellSettings = shellSettings; _runningShellTable = runningShellTable; _workContextAccessor = workContextAccessor; if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) { _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); } Area = route.GetAreaName(); }
public RoutePublisher( RouteCollection routeCollection, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable, IExtensionManager extensionManager) { this.routeCollection = routeCollection; this.shellSettings = shellSettings; this.workContextAccessor = workContextAccessor; this.runningShellTable = runningShellTable; this.extensionManager = extensionManager; }
public ShellHost(IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IExtensionManager extensionManager, ILogger <ShellHost> logger) { this._shellContexts = new ConcurrentDictionary <string, ShellContext>(); this._shellSemaphores = new ConcurrentDictionary <string, SemaphoreSlim>(); this._initializingSemaphore = new SemaphoreSlim(1); base(); this._shellSettingsManager = shellSettingsManager; this._shellContextFactory = shellContextFactory; this._runningShellTable = runningShellTable; this._extensionManager = extensionManager; this._logger = logger; return; }
public DefaultOrchardHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ControllerBuilder controllerBuilder) { //_containerProvider = containerProvider; _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _controllerBuilder = controllerBuilder; Logger = NullLogger.Instance; }
public OpenIdValidationConfiguration( ILogger <OpenIdValidationConfiguration> logger, IOpenIdValidationService validationService, IRunningShellTable runningShellTable, IShellHost shellHost, ShellSettings shellSettings) { _logger = logger; _validationService = validationService; _runningShellTable = runningShellTable; _shellHost = shellHost; _shellSettings = shellSettings; }
public ShellHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IExtensionManager extensionManager, ILogger <ShellHost> logger) { _extensionManager = extensionManager; _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _logger = logger; }
public WebHost(IExtensionLoaderCoordinator extensionLoaderCoordinator, ICacheManager cacheManager, IHostLocalRestart hostLocalRestart, IExtensionMonitoringCoordinator extensionMonitoringCoordinator, IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable) { _extensionLoaderCoordinator = extensionLoaderCoordinator; _cacheManager = cacheManager; _hostLocalRestart = hostLocalRestart; _extensionMonitoringCoordinator = extensionMonitoringCoordinator; _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _tenantsToRestart = new ContextState <IList <ShellSettings> >("DefaultHost.TenantsToRestart", () => new List <ShellSettings>()); Logger = NullLogger.Instance; }
public WebHost(IExtensionLoaderCoordinator extensionLoaderCoordinator, ICacheManager cacheManager, IHostLocalRestart hostLocalRestart, IExtensionMonitoringCoordinator extensionMonitoringCoordinator, IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable) { _extensionLoaderCoordinator = extensionLoaderCoordinator; _cacheManager = cacheManager; _hostLocalRestart = hostLocalRestart; _extensionMonitoringCoordinator = extensionMonitoringCoordinator; _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _tenantsToRestart = new ContextState<IList<ShellSettings>>("DefaultHost.TenantsToRestart", () => new List<ShellSettings>()); Logger = NullLogger.Instance; }
public ShellRoute(RouteBase route, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable, Func <IDictionary <string, object>, Task> pipeline) { _route = route; _shellSettings = shellSettings; _runningShellTable = runningShellTable; _pipeline = pipeline; _workContextAccessor = workContextAccessor; if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) { _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); } Area = route.GetAreaName(); }
public DefaultPlatoHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IBackgroundTaskManager taskManager, ILogger <DefaultPlatoHost> logger, IBroker broker) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _taskManager = taskManager; _logger = logger; _broker = broker; }
public static ShellSettings Match(this IRunningShellTable table, HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } var httpRequest = httpContext.Request; // The Host property contains the value as set from the client. It is replaced automatically // to the value of X-Forwarded-Host when UseIISIntegration() is invoked. // The same way .Scheme contains the protocol that the user set and not what a proxy // could be using (see X-Forwarded-Proto). return(table.Match(httpRequest.Host, httpRequest.Path, true)); }
public SetupService( IShellHost orchardHost, IHostingEnvironment hostingEnvironment, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IEnumerable <IRecipeHarvester> recipeHarvesters, ILogger <SetupService> logger, IStringLocalizer <SetupService> stringLocalizer ) { _orchardHost = orchardHost; _applicationName = hostingEnvironment.ApplicationName; _shellContextFactory = shellContextFactory; _recipeHarvesters = recipeHarvesters; _logger = logger; T = stringLocalizer; }
public ShellFeatureManager( IShellDescriptorManager shellDescriptorManager, IShellDescriptorStore shellDescriptorStore, IHttpContextAccessor httpContextAccessor, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ILogger <ShellFeatureManager> logger, IPlatoHost platoHost) { _shellDescriptorManager = shellDescriptorManager; _shellDescriptorStore = shellDescriptorStore; _httpContextAccessor = httpContextAccessor; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _platoHost = platoHost; _logger = logger; }
public SetupService( IShellHost shellHost, IWebHostEnvironment hostingEnvironment, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, ILogger <SetupService> logger, IStringLocalizerFactory stringLocalizerFactory, IStringLocalizer <SetupService> stringLocalizer, IHostApplicationLifetime applicationLifetime ) { _shellHost = shellHost; _applicationName = hostingEnvironment.ApplicationName; _shellContextFactory = shellContextFactory; _logger = logger; T = stringLocalizer; _applicationLifetime = applicationLifetime; }
public ShellRoute(RouteBase route, ShellSettings shellSettings, ILifetimeScope shellLifetimeScope, IRunningShellTable runningShellTable) { _route = route; _shellSettings = shellSettings; _runningShellTable = runningShellTable; _container = new LifetimeScopeContainer(shellLifetimeScope); if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); var routeWithArea = route as IRouteWithArea; if (routeWithArea != null) { Area = routeWithArea.Area; } var routeWithDataTokens = route as Route; if ((routeWithDataTokens != null) && (routeWithDataTokens.DataTokens != null)) { Area = (routeWithDataTokens.DataTokens["area"] as string); } }
public ScheduledTaskExecutor( IClock clock, IRepository<ScheduledTaskRecord> repository, IEnumerable<IScheduledTaskHandler> handlers, ISessionLocator sessionLocator, ITransactionManager transactionManager, ShellSettings shellSettings, IWorkContextAccessor workContextAccessor, IRunningShellTable runningShellTable, IProcessingEngine processingEngine, IShellDescriptorManager shellDescriptorManager, IOrchardServices orchardServices, IContentManager contentManager) { _clock = clock; _orchardServices = orchardServices; _repository = repository; _transactionManager = transactionManager; _handlers = handlers; _contentManager = contentManager; _sessionLocator = sessionLocator; Logger = NullLogger.Instance; }
public SetupService( ShellSettings shellSettings, IOrchardHost orchardHost, IShellSettingsManager shellSettingsManager, IShellContainerFactory shellContainerFactory, ICompositionStrategy compositionStrategy, IExtensionManager extensionManager, IHttpContextAccessor httpContextAccessor, IRunningShellTable runningShellTable, ILoggerFactory loggerFactory) { _shellSettings = shellSettings; _orchardHost = orchardHost; _shellSettingsManager = shellSettingsManager; _shellContainerFactory = shellContainerFactory; _compositionStrategy = compositionStrategy; _extensionManager = extensionManager; _httpContextAccessor = httpContextAccessor; _runningShellTable = runningShellTable; _logger = loggerFactory.CreateLogger<SetupService>(); }
public static ShellSettings Match(this IRunningShellTable table, HttpContext httpContext) { // use Host header to prevent proxy alteration of the orignal request try { var httpRequest = httpContext.Request; if (httpRequest == null) { return(null); } var host = httpRequest.Headers["Host"].ToString(); return(table.Match(host ?? string.Empty, httpRequest.Path)); } catch (Exception) { // can happen on cloud service for an unknown reason return(null); } }
public SetupService( ShellSettings shellSettings, IOrchardHost orchardHost, IShellContextFactory shellContextFactory, ICompositionStrategy compositionStrategy, IExtensionManager extensionManager, IHttpContextAccessor httpContextAccessor, IRunningShellTable runningShellTable, IRecipeHarvester recipeHarvester, ILogger<SetupService> logger ) { _shellSettings = shellSettings; _orchardHost = orchardHost; _shellContextFactory = shellContextFactory; _compositionStrategy = compositionStrategy; _extensionManager = extensionManager; _httpContextAccessor = httpContextAccessor; _runningShellTable = runningShellTable; _recipeHarvester = recipeHarvester; _logger = logger; }
public DefaultOrchardHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IProcessingEngine processingEngine, IExtensionLoaderCoordinator extensionLoaderCoordinator, IExtensionMonitoringCoordinator extensionMonitoringCoordinator, ICacheManager cacheManager, IHostLocalRestart hostLocalRestart ) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _processingEngine = processingEngine; _extensionLoaderCoordinator = extensionLoaderCoordinator; _extensionMonitoringCoordinator = extensionMonitoringCoordinator; _cacheManager = cacheManager; _hostLocalRestart = hostLocalRestart; _tenantsToRestart = Enumerable.Empty<ShellSettings>(); T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public DefaultCoeveryHost( IShellSettingsManager shellSettingsManager, IShellContextFactory shellContextFactory, IRunningShellTable runningShellTable, IProcessingEngine processingEngine, IExtensionLoaderCoordinator extensionLoaderCoordinator, IExtensionMonitoringCoordinator extensionMonitoringCoordinator, ICacheManager cacheManager, IHostLocalRestart hostLocalRestart ) { _shellSettingsManager = shellSettingsManager; _shellContextFactory = shellContextFactory; _runningShellTable = runningShellTable; _processingEngine = processingEngine; _extensionLoaderCoordinator = extensionLoaderCoordinator; _extensionMonitoringCoordinator = extensionMonitoringCoordinator; _cacheManager = cacheManager; _hostLocalRestart = hostLocalRestart; _tenantsToRestart = new ContextState<IList<ShellSettings>>("DefaultCoeveryHost.TenantsToRestart", () => new List<ShellSettings>()); T = NullLocalizer.Instance; Logger = NullLogger.Instance; }