Exemple #1
0
    /// <summary>
    ///     Initializes a new instance of the <see cref="CoreRuntime" /> class.
    /// </summary>
    public CoreRuntime(
        IRuntimeState state,
        ILoggerFactory loggerFactory,
        ComponentCollection components,
        IApplicationShutdownRegistry applicationShutdownRegistry,
        IProfilingLogger profilingLogger,
        IMainDom mainDom,
        IUmbracoDatabaseFactory databaseFactory,
        IEventAggregator eventAggregator,
        IHostingEnvironment hostingEnvironment,
        IUmbracoVersion umbracoVersion,
        IServiceProvider?serviceProvider,
        IHostApplicationLifetime?hostApplicationLifetime)
    {
        State = state;

        _loggerFactory = loggerFactory;
        _components    = components;
        _applicationShutdownRegistry = applicationShutdownRegistry;
        _profilingLogger             = profilingLogger;
        _mainDom                 = mainDom;
        _databaseFactory         = databaseFactory;
        _eventAggregator         = eventAggregator;
        _hostingEnvironment      = hostingEnvironment;
        _umbracoVersion          = umbracoVersion;
        _serviceProvider         = serviceProvider;
        _hostApplicationLifetime = hostApplicationLifetime;
        _logger = _loggerFactory.CreateLogger <CoreRuntime>();
    }
Exemple #2
0
 public CoreRuntime(
     ILoggerFactory loggerFactory,
     IRuntimeState state,
     ComponentCollection components,
     IApplicationShutdownRegistry applicationShutdownRegistry,
     IProfilingLogger profilingLogger,
     IMainDom mainDom,
     IUmbracoDatabaseFactory databaseFactory,
     IEventAggregator eventAggregator,
     IHostingEnvironment hostingEnvironment,
     IUmbracoVersion umbracoVersion,
     IServiceProvider?serviceProvider)
     : this(
         state,
         loggerFactory,
         components,
         applicationShutdownRegistry,
         profilingLogger,
         mainDom,
         databaseFactory,
         eventAggregator,
         hostingEnvironment,
         umbracoVersion,
         serviceProvider,
         serviceProvider?.GetRequiredService <IHostApplicationLifetime>())
 {
 }
Exemple #3
0
 public CoreRuntime(
     ILoggerFactory loggerFactory,
     IRuntimeState state,
     ComponentCollection components,
     IApplicationShutdownRegistry applicationShutdownRegistry,
     IProfilingLogger profilingLogger,
     IMainDom mainDom,
     IUmbracoDatabaseFactory databaseFactory,
     IEventAggregator eventAggregator,
     IHostingEnvironment hostingEnvironment,
     IUmbracoVersion umbracoVersion)
     : this(
         loggerFactory,
         state,
         components,
         applicationShutdownRegistry,
         profilingLogger,
         mainDom,
         databaseFactory,
         eventAggregator,
         hostingEnvironment,
         umbracoVersion,
         null)
 {
 }