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
Name Description
serivces IServiceCollection

The IServiceCollection instance.

Returns
Type Description
IServiceCollection

The IServiceCollection instance.

Type Parameter
Name Description
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
Name Description
serivces IServiceCollection

The IServiceCollection instance.

instance T

The instance of T.

Returns
Type Description
IServiceCollection

The IServiceCollection instance.

Type Parameter
Name Description
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
Name Description
serivces IServiceCollection

The IServiceCollection instance.

implementationFactory Func<IServiceProvider, T>

The factory that creates the service.

Returns
Type Description
IServiceCollection

The IServiceCollection instance.

Type Parameter
Name Description
T

The type of the ILogEntryLabelProvider implementation.