ApplicationEnricherServiceCollectionExtensions.AddServiceLogEnricher 方法

定义

重载

AddServiceLogEnricher(IServiceCollection)

将服务扩充器实例添加到 。IServiceCollection

AddServiceLogEnricher(IServiceCollection, IConfigurationSection)

将服务扩充器实例添加到 。IServiceCollection

AddServiceLogEnricher(IServiceCollection, Action<ApplicationLogEnricherOptions>)

将服务扩充器实例添加到 。IServiceCollection

AddServiceLogEnricher(IServiceCollection)

Source:
ApplicationEnricherServiceCollectionExtensions.cs

将服务扩充器实例添加到 。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 的值。

例外

servicesnull

适用于

AddServiceLogEnricher(IServiceCollection, IConfigurationSection)

Source:
ApplicationEnricherServiceCollectionExtensions.cs

将服务扩充器实例添加到 。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>)

Source:
ApplicationEnricherServiceCollectionExtensions.cs

将服务扩充器实例添加到 。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要向其添加服务扩充器的 。

返回

services 的值。

例外

任何参数都是 null

适用于