Skip to content

IServiceCollectionExtensions Class

Definition

Extension methods for IServiceCollection.

C#
public static class IServiceCollectionExtensions

Inheritance object

Methods

AddSQTechToolTelemetry(IServiceCollection, string, bool, ITelemetryChannel?, bool)

Adds the telemetry service to the service collection.

C#
public static IServiceCollection AddSQTechToolTelemetry(this IServiceCollection serviceCollection, string appInsightsConnectionString, bool disablePII = false, ITelemetryChannel? telemetryChannel = null, bool enableMetrics = true)

Parameters

serviceCollection IServiceCollection
The service collection.

appInsightsConnectionString string
The Application Insights connection string.

disablePII bool
Whether or not to disable automatic PII collection.

telemetryChannel ITelemetryChannel
The telemetry channel to use.

enableMetrics bool
Whether or not to add metric services.

Returns

IServiceCollection
The updated service collection.