public void Dispose() { this.FilingClient?.Dispose(); this.FilingClient = null; ITelemetryChannel channel = ServiceProviderFactory.ServiceProvider.GetService<ITelemetryChannel>(); channel?.Flush(); channel?.Dispose(); }
private void DisposeChannel() { try { appInsightsChannel.Dispose(); } catch (InvalidOperationException) { } catch (FileNotFoundException) { } }
private void Dispose(bool disposing) { if (disposing) { Interlocked.CompareExchange(ref active, null, this); ITelemetryChannel telemetryChannel = this.TelemetryChannel; if (telemetryChannel != null) { telemetryChannel.Dispose(); } } }