Class LabelProviderExtensions (4.4.0)

[Obsolete("Use equivalent extension methods defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.")]
public static class LabelProviderExtensions

Provides extension methods to register ILogEntryLabelProvider implementations.

Inheritance

Object > LabelProviderExtensions

Namespace

Google.Cloud.Diagnostics.AspNetCore

Assembly

Google.Cloud.Diagnostics.AspNetCore.dll

Methods

AddLogEntryLabelProvider<T>(IServiceCollection)

[Obsolete("Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.")]
public static IServiceCollection AddLogEntryLabelProvider<T>(this IServiceCollection serivces)
    where T : class, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance.

Parameter
NameDescription
serivcesIServiceCollection

The IServiceCollection instance.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
T

The type of the ILogEntryLabelProvider implementation.

AddLogEntryLabelProvider<T>(IServiceCollection, T)

[Obsolete("Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.")]
public static IServiceCollection AddLogEntryLabelProvider<T>(this IServiceCollection serivces, T instance)
    where T : class, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance.

Parameters
NameDescription
serivcesIServiceCollection

The IServiceCollection instance.

instanceT

The instance of T.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
T

The type of the ILogEntryLabelProvider implementation.

AddLogEntryLabelProvider<T>(IServiceCollection, Func<IServiceProvider, T>)

[Obsolete("Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.")]
public static IServiceCollection AddLogEntryLabelProvider<T>(this IServiceCollection serivces, Func<IServiceProvider, T> implementationFactory)
    where T : class, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance.

Parameters
NameDescription
serivcesIServiceCollection

The IServiceCollection instance.

implementationFactoryFunc<IServiceProvider, T>

The factory that creates the service.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
T

The type of the ILogEntryLabelProvider implementation.