EnrichmentServiceCollectionExtensions.AddStaticLogEnricher 方法

定义

重载

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

注册静态日志扩充器实例。

AddStaticLogEnricher<T>(IServiceCollection)

注册静态日志扩充器类型。

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

Source:
EnrichmentServiceCollectionExtensions.cs

注册静态日志扩充器实例。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddStaticLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Diagnostics::Enrichment::IStaticLogEnricher ^ enricher);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStaticLogEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Diagnostics.Enrichment.IStaticLogEnricher enricher);
static member AddStaticLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Diagnostics.Enrichment.IStaticLogEnricher -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddStaticLogEnricher (services As IServiceCollection, enricher As IStaticLogEnricher) As IServiceCollection

参数

services
IServiceCollection

要向其添加扩充器实例的依赖项注入容器。

enricher
IStaticLogEnricher

要添加的扩充器实例。

返回

services 的值。

例外

servicesenrichernull

适用于

AddStaticLogEnricher<T>(IServiceCollection)

Source:
EnrichmentServiceCollectionExtensions.cs

注册静态日志扩充器类型。

public:
generic <typename T>
 where T : class, Microsoft::Extensions::Diagnostics::Enrichment::IStaticLogEnricher[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddStaticLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStaticLogEnricher<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.Extensions.Diagnostics.Enrichment.IStaticLogEnricher;
static member AddStaticLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.Enrichment.IStaticLogEnricher)
<Extension()>
Public Function AddStaticLogEnricher(Of T As {Class, IStaticLogEnricher}) (services As IServiceCollection) As IServiceCollection

类型参数

T

扩充器类型。

参数

services
IServiceCollection

要向其添加扩充器类型的依赖项注入容器。

返回

services 的值。

例外

servicesnull

适用于