Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StartupSettings"/> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="hostingEnvironment">The hosting environment.</param>
        /// <param name="loggerFactory">The logger factory.</param>
        /// <param name="serviceHost">The service host.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="operatingSystem">The operating system.</param>
        /// <param name="serviceHostConfig">The service host configuration.</param>
        /// <param name="serviceDatabaseConfig">The service database configuration.</param>
        /// <exception cref="ArgumentNullException">
        /// configuration
        /// or
        /// hostingEnvironment
        /// or
        /// loggerFactory
        /// or
        /// fileSystem
        /// or
        /// operatingSystem
        /// </exception>
        /// <autogeneratedoc />
        protected StartupSettings(IConfiguration configuration, IHostingEnvironment hostingEnvironment,
                                  IPureLoggerFactory loggerFactory, ServiceHost serviceHost, IFileSystem fileSystem,
                                  IOperatingSystem operatingSystem, ServiceHostConfig serviceHostConfig = ServiceHostConfig.Kestrel,
                                  ServiceDatabaseConfig serviceDatabaseConfig = ServiceDatabaseConfig.LocalHost)
        {
            Configuration      = configuration ?? throw new ArgumentNullException(nameof(configuration));
            HostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
            LoggerFactory      = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
            FileSystem         = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
            OperatingSystem    = operatingSystem ?? throw new ArgumentNullException(nameof(operatingSystem));

            ServiceHost           = serviceHost;
            ServiceHostConfig     = serviceHostConfig;
            ServiceDatabaseConfig = serviceDatabaseConfig;
        }
Exemplo n.º 2
0
 public Startup(IConfiguration configuration)
 {
     Configuration     = configuration;
     ServiceHostConfig = configuration.GetSection("ServiceHostConfig").Get <ServiceHostConfig>();
 }