<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Extensibility.Implementation.OperationHolder<T>

Operation class that holds the telemetry item and the corresponding telemetry client.

Parent context store that is used to restore call context.

public T Telemetry { get; }

Gets Telemetry item of interest that is created when StartOperation function of ClientExtensions is invoked.

public OperationHolder(TelemetryClient telemetryClient, T telemetry, object originalActivity = null)

Initializes a new instance of the OperationHolder<T> class. Initializes telemetry client.

public void Dispose()

Dispose method to clear the variables.

protected virtual void Dispose(bool disposing)

Computes the duration and tracks the respective telemetry item on dispose.