EnrichmentServiceCollectionExtensions.AddLogEnricher Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddLogEnricher(IServiceCollection, ILogEnricher) |
Registers a log enricher instance. |
AddLogEnricher<T>(IServiceCollection) |
Registers a log enricher type. |
AddLogEnricher(IServiceCollection, ILogEnricher)
Registers a log enricher instance.
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
Parameters
- services
- IServiceCollection
The dependency injection container to add the enricher instance to.
- enricher
- ILogEnricher
The enricher instance to add.
Returns
The value of services
.
Exceptions
services
or enricher
is null
.
Applies to
AddLogEnricher<T>(IServiceCollection)
Registers a log enricher type.
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
Type Parameters
- T
Enricher type.
Parameters
- services
- IServiceCollection
The dependency injection container to add the enricher type to.
Returns
The value of services
.
Exceptions
services
is null
.
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.