Partager via


EnrichmentServiceCollectionExtensions.AddStaticLogEnricher Méthode

Définition

Surcharges

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

Inscrit un enrichisseur de journal statique instance.

AddStaticLogEnricher<T>(IServiceCollection)

Inscrit un type d’enrichissement de journal statique.

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

Source:
EnrichmentServiceCollectionExtensions.cs
Source:
EnrichmentServiceCollectionExtensions.cs

Inscrit un enrichisseur de journal statique instance.

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

Paramètres

services
IServiceCollection

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

enricher
IStaticLogEnricher

L’enrichisseur instance à ajouter.

Retours

la valeur de la propriété services ;

Exceptions

services ou enricher est null.

S’applique à

AddStaticLogEnricher<T>(IServiceCollection)

Source:
EnrichmentServiceCollectionExtensions.cs
Source:
EnrichmentServiceCollectionExtensions.cs

Inscrit un type d’enrichissement de journal statique.

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

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 à