ApplicationEnricherServiceCollectionExtensions.AddServiceLogEnricher 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddServiceLogEnricher(IServiceCollection)
将服务扩充器实例添加到 。IServiceCollection
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection) As IServiceCollection
参数
- services
- IServiceCollection
IServiceCollection要向其添加服务扩充器的 。
返回
services
的值。
例外
services
为 null
。
适用于
AddServiceLogEnricher(IServiceCollection, IConfigurationSection)
将服务扩充器实例添加到 。IServiceCollection
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
参数
- services
- IServiceCollection
IServiceCollection要向其添加服务扩充器的 。
- section
- IConfigurationSection
IConfigurationSection用于在服务扩充器中配置的 ApplicationLogEnricherOptions 。
返回
services
的值。
例外
任何参数都是 null
。
适用于
AddServiceLogEnricher(IServiceCollection, Action<ApplicationLogEnricherOptions>)
将服务扩充器实例添加到 。IServiceCollection
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddServiceLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::Enrichment::ApplicationLogEnricherOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServiceLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.Enrichment.ApplicationLogEnricherOptions> configure);
static member AddServiceLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.Enrichment.ApplicationLogEnricherOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddServiceLogEnricher (services As IServiceCollection, configure As Action(Of ApplicationLogEnricherOptions)) As IServiceCollection
参数
- services
- IServiceCollection
IServiceCollection要向其添加服务扩充器的 。
- configure
- Action<ApplicationLogEnricherOptions>
返回
services
的值。
例外
任何参数都是 null
。