Sdílet prostřednictvím


EnrichmentServiceCollectionExtensions.AddStaticLogEnricher Metoda

Definice

Přetížení

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

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

AddStaticLogEnricher<T>(IServiceCollection)

Zaregistruje typ statického rozšiřovače protokolů.

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

Zdroj:
EnrichmentServiceCollectionExtensions.cs

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

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

Parametry

services
IServiceCollection

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

enricher
IStaticLogEnricher

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

Návraty

Hodnota .services

Výjimky

services nebo enricher je null.

Platí pro

AddStaticLogEnricher<T>(IServiceCollection)

Zdroj:
EnrichmentServiceCollectionExtensions.cs

Zaregistruje typ statického rozšiřovače protokolů.

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

Parametry typu

T

Typ rozšiřovače.

Parametry

services
IServiceCollection

Kontejner injektáže závislostí, do které chcete přidat typ rozšiřovače.

Návraty

Hodnota .services

Výjimky

services je null.

Platí pro