Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="configuration">Instance of <see cref="configuration"/>
        /// </param>
        /// <param name="environment">Instance of
        /// <see cref="IHostingEnvironment"/></param>
        /// <param name="logger">Instance of <see cref="ILogger{Startup}"/>
        /// </param>
        public Startup(
            IConfiguration configuration,
            IHostingEnvironment environment,
            ILoggerFactory loggerFactory,
            Func <HttpMessageHandler> messageHandlerFactory = null)
        {
            this._logger                = loggerFactory.CreateLogger <Startup>();
            this._environment           = environment;
            this._configuration         = configuration;
            this._modulesStartup        = new ModulesStartup(configuration);
            this._messageHandlerFactory = messageHandlerFactory;

            this._applicationOptions = this._configuration.GetSection("App")
                                       .Get <ApplicationOptions>() ?? new ApplicationOptions();
        }
Пример #2
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     this._modules = new ModulesStartup(new OpenSourceConfiguration(configuration));
 }