Sdílet prostřednictvím


EnrichmentServiceCollectionExtensions.AddLogEnricher Metoda

Definice

Přetížení

AddLogEnricher(IServiceCollection, ILogEnricher)

Zaregistruje instanci nástroje pro rozšiřování protokolů.

AddLogEnricher<T>(IServiceCollection)

Zaregistruje typ nástroje pro rozšiřování protokolů.

AddLogEnricher(IServiceCollection, ILogEnricher)

Zdroj:
EnrichmentServiceCollectionExtensions.cs
Zdroj:
EnrichmentServiceCollectionExtensions.cs

Zaregistruje instanci nástroje pro rozšiřování protokolů.

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

Kontejner injektáže závislostí, do které se má přidat instance enricheru.

enricher
ILogEnricher

Instance enricher, která se má přidat.

Návraty

Hodnota .services

Výjimky

services nebo enricher je null.

Platí pro

AddLogEnricher<T>(IServiceCollection)

Zdroj:
EnrichmentServiceCollectionExtensions.cs
Zdroj:
EnrichmentServiceCollectionExtensions.cs

Zaregistruje typ nástroje pro rozšiřování protokolů.

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 enricheru.

Parametry

services
IServiceCollection

Kontejner injektáže závislostí, do které chcete přidat typ enricheru.

Návraty

Hodnota .services

Výjimky

services je null.

Platí pro