// Primarily, for testing purposes only public void SetApplicationServiceProvider(IApplicationServiceProvider applicationServiceProvider) { if (applicationServiceProvider == null) { throw new ArgumentNullException(nameof(applicationServiceProvider)); } _ApplicationServiceProvider = applicationServiceProvider; }
/// <summary> /// Initializes DI services that the node needs. /// </summary> /// <param name="serviceProvider">Provider of DI services.</param> /// <returns>Full node itself to allow fluent code.</returns> public Application Initialize(IApplicationServiceProvider serviceProvider) { Guard.NotNull(serviceProvider, nameof(serviceProvider)); this.Services = serviceProvider; _logger = this.Services.ServiceProvider.GetRequiredService <ILogger <Application> >(); _configuration = this.Services.ServiceProvider.GetService <IConfiguration>(); _options = this.Services.ServiceProvider.GetService <ApplicationOptions>(); this.AsyncLoopFactory = this.Services.ServiceProvider.GetService <IAsyncLoopFactory>(); this._logger.LogInformation($"Application initialized."); return(this); }
public MainApplicationContext Clone(IApplicationServiceProvider applicationServiceProvider = null) { var context = new MainApplicationContext(applicationServiceProvider ?? _ApplicationServiceProvider); context.ArgsOnly = ArgsOnly; context.InitFile = InitFile; context.CommodityPool = CommodityPool; context.IsAtty = IsAtty; context.TimesCommon = TimesCommon; context.DefaultScope = DefaultScope; context.EmptyScope = EmptyScope; context.Logger = Logger; context.IsVerifyEnabled = IsVerifyEnabled; context.DefaultStyle = DefaultStyle; context.DefaultStyleChanged = DefaultStyleChanged; context.TimeZone = TimeZone; context.ErrorContext = ErrorContext; context.CancellationSignal = CancellationSignal; context.DefaultPager = DefaultPager; context._EnvironmentVariables = _EnvironmentVariables; return(context); }
public MainApplicationContext(IApplicationServiceProvider applicationServiceProvider = null) { _ApplicationServiceProvider = applicationServiceProvider ?? new ApplicationServiceProvider(); }
public ProvidersController(IApplicationServiceProvider applicationServiceProvider) { _applicationServiceProvider = applicationServiceProvider; }
public PostCommitCommandRegistrar(IApplicationServiceProvider serviceProvider) { _serviceProvider = serviceProvider; }
public ProviderController(INotifier notifier, IApplicationServiceProvider applicationServideProvider) : base(notifier) { _applicationServideProvider = applicationServideProvider; }
public AutoMapperTask(IEnumerable<Profile> profiles, IConfiguration configuration, IApplicationServiceProvider serviceContainer) { _configuration = configuration; _autoMapperProfiles = profiles; _container = serviceContainer; }
public AutoMapperTask(IEnumerable <Profile> profiles, IConfiguration configuration, IApplicationServiceProvider serviceContainer) { _configuration = configuration; _autoMapperProfiles = profiles; _container = serviceContainer; }