Partager via


EnrichmentServiceCollectionExtensions.AddLogEnricher Méthode

Définition

Surcharges

AddLogEnricher(IServiceCollection, ILogEnricher)

Inscrit un instance d’enrichissement de journal.

AddLogEnricher<T>(IServiceCollection)

Inscrit un type d’enrichisseur de journal.

AddLogEnricher(IServiceCollection, ILogEnricher)

Source:
EnrichmentServiceCollectionExtensions.cs
Source:
EnrichmentServiceCollectionExtensions.cs

Inscrit un instance d’enrichissement de journal.

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

Paramètres

services
IServiceCollection

Conteneur d’injection de dépendances dans lequel ajouter l’enrichisseur instance.

enricher
ILogEnricher

L’enrichisseur instance à ajouter.

Retours

la valeur de la propriété services ;

Exceptions

services ou enricher est null.

S’applique à

AddLogEnricher<T>(IServiceCollection)

Source:
EnrichmentServiceCollectionExtensions.cs
Source:
EnrichmentServiceCollectionExtensions.cs

Inscrit un type d’enrichisseur de journal.

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

Paramètres de type

T

Type d’enrichissement.

Paramètres

services
IServiceCollection

Conteneur d’injection de dépendances auquel ajouter le type d’enrichisseur.

Retours

la valeur de la propriété services ;

Exceptions

services a la valeur null.

S’applique à