共用方式為


EnrichmentServiceCollectionExtensions.AddStaticLogEnricher 方法

定義

多載

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

註冊靜態記錄擴充器實例。

AddStaticLogEnricher<T>(IServiceCollection)

註冊靜態記錄擴充器類型。

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

來源:
EnrichmentServiceCollectionExtensions.cs

註冊靜態記錄擴充器實例。

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

參數

services
IServiceCollection

要加入擴充器實例的相依性插入容器。

enricher
IStaticLogEnricher

要加入的擴充器實例。

傳回

services 的值。

例外狀況

servicesenrichernull

適用於

AddStaticLogEnricher<T>(IServiceCollection)

來源:
EnrichmentServiceCollectionExtensions.cs

註冊靜態記錄擴充器類型。

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

類型參數

T

擴充器類型。

參數

services
IServiceCollection

要加入擴充器類型的相依性插入容器。

傳回

services 的值。

例外狀況

servicesnull

適用於