Condividi tramite


EnrichmentServiceCollectionExtensions.AddLogEnricher Metodo

Definizione

Overload

AddLogEnricher(IServiceCollection, ILogEnricher)

Registra un'istanza di arricchimento del log.

AddLogEnricher<T>(IServiceCollection)

Registra un tipo di arricchimento del log.

AddLogEnricher(IServiceCollection, ILogEnricher)

Origine:
EnrichmentServiceCollectionExtensions.cs
Origine:
EnrichmentServiceCollectionExtensions.cs

Registra un'istanza di arricchimento del log.

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

Parametri

services
IServiceCollection

Contenitore di inserimento delle dipendenze a cui aggiungere l'istanza di arricchimento.

enricher
ILogEnricher

Istanza di arricchimento da aggiungere.

Restituisce

Valore di services.

Eccezioni

services o enricher è null.

Si applica a

AddLogEnricher<T>(IServiceCollection)

Origine:
EnrichmentServiceCollectionExtensions.cs
Origine:
EnrichmentServiceCollectionExtensions.cs

Registra un tipo di arricchimento del log.

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

Parametri di tipo

T

Tipo di arricchimento.

Parametri

services
IServiceCollection

Contenitore di inserimento delle dipendenze a cui aggiungere il tipo di arricchimento.

Restituisce

Valore di services.

Eccezioni

services è null.

Si applica a