Udostępnij za pośrednictwem


EnrichmentServiceCollectionExtensions.AddLogEnricher Metoda

Definicja

Przeciążenia

AddLogEnricher(IServiceCollection, ILogEnricher)

Rejestruje wystąpienie wzbogacacza dzienników.

AddLogEnricher<T>(IServiceCollection)

Rejestruje typ wzbogacacza dziennika.

AddLogEnricher(IServiceCollection, ILogEnricher)

Źródło:
EnrichmentServiceCollectionExtensions.cs

Rejestruje wystąpienie wzbogacacza dzienników.

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

Parametry

services
IServiceCollection

Kontener wstrzykiwania zależności w celu dodania wystąpienia wzbogacacza.

enricher
ILogEnricher

Wystąpienie wzbogacacza do dodania.

Zwraca

Wartość .services

Wyjątki

services lub enricher ma wartość null.

Dotyczy

AddLogEnricher<T>(IServiceCollection)

Źródło:
EnrichmentServiceCollectionExtensions.cs

Rejestruje typ wzbogacacza dziennika.

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

Parametry typu

T

Typ wzbogacacza.

Parametry

services
IServiceCollection

Kontener wstrzykiwania zależności w celu dodania typu wzbogacacza do.

Zwraca

Wartość .services

Wyjątki

services to null.

Dotyczy