ConsoleLifetime 构造函数

定义

重载

ConsoleLifetime(IOptions<ConsoleLifetimeOptions>, IHostEnvironment, IHostApplicationLifetime, IOptions<HostOptions>)

此 API 支持基础结构,不打算直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

ConsoleLifetime(IOptions<ConsoleLifetimeOptions>, IHostEnvironment, IHostApplicationLifetime, IOptions<HostOptions>, ILoggerFactory)

此 API 支持基础结构,不打算直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

ConsoleLifetime(IOptions<ConsoleLifetimeOptions>, IHostEnvironment, IHostApplicationLifetime, IOptions<HostOptions>)

Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs

此 API 支持基础结构,不打算直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

public:
 ConsoleLifetime(Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::ConsoleLifetimeOptions ^> ^ options, Microsoft::Extensions::Hosting::IHostEnvironment ^ environment, Microsoft::Extensions::Hosting::IHostApplicationLifetime ^ applicationLifetime, Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::HostOptions ^> ^ hostOptions);
public ConsoleLifetime (Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> hostOptions);
new Microsoft.Extensions.Hosting.Internal.ConsoleLifetime : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> * Microsoft.Extensions.Hosting.IHostEnvironment * Microsoft.Extensions.Hosting.IHostApplicationLifetime * Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> -> Microsoft.Extensions.Hosting.Internal.ConsoleLifetime
Public Sub New (options As IOptions(Of ConsoleLifetimeOptions), environment As IHostEnvironment, applicationLifetime As IHostApplicationLifetime, hostOptions As IOptions(Of HostOptions))

参数

options
IOptions<ConsoleLifetimeOptions>

用于检索 ConsoleLifetimeOptions 实例的对象。

environment
IHostEnvironment

一个对象,该对象包含有关应用程序正在运行的宿主环境的信息。

applicationLifetime
IHostApplicationLifetime

一个对象,允许使用者收到应用程序生存期事件的通知。

hostOptions
IOptions<HostOptions>

用于检索 Microsoft.Extensions.Hosting.Internal.ConsoleLifetime.HostOptions 实例的对象。

例外

optionsenvironmentapplicationLifetimehostOptionsnull

适用于

ConsoleLifetime(IOptions<ConsoleLifetimeOptions>, IHostEnvironment, IHostApplicationLifetime, IOptions<HostOptions>, ILoggerFactory)

Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs
Source:
ConsoleLifetime.cs

此 API 支持基础结构,不打算直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

public:
 ConsoleLifetime(Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::ConsoleLifetimeOptions ^> ^ options, Microsoft::Extensions::Hosting::IHostEnvironment ^ environment, Microsoft::Extensions::Hosting::IHostApplicationLifetime ^ applicationLifetime, Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::HostOptions ^> ^ hostOptions, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public ConsoleLifetime (Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> hostOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.Extensions.Hosting.Internal.ConsoleLifetime : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> * Microsoft.Extensions.Hosting.IHostEnvironment * Microsoft.Extensions.Hosting.IHostApplicationLifetime * Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Hosting.Internal.ConsoleLifetime
Public Sub New (options As IOptions(Of ConsoleLifetimeOptions), environment As IHostEnvironment, applicationLifetime As IHostApplicationLifetime, hostOptions As IOptions(Of HostOptions), loggerFactory As ILoggerFactory)

参数

options
IOptions<ConsoleLifetimeOptions>

用于检索 ConsoleLifetimeOptions 实例的对象

environment
IHostEnvironment

一个对象,该对象包含有关应用程序正在运行的宿主环境的信息。

applicationLifetime
IHostApplicationLifetime

一个对象,允许使用者收到应用程序生存期事件的通知。

hostOptions
IOptions<HostOptions>

用于检索 Microsoft.Extensions.Hosting.Internal.ConsoleLifetime.HostOptions 实例的对象。

loggerFactory
ILoggerFactory

用于配置日志记录系统并从已注册 ILoggerProvider创建 ILogger 实例的对象。

例外

optionsenvironmentapplicationLifetimehostOptionsloggerFactorynull

适用于