Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryChannelBase.StartOpenTelemetry(string)

Here are the examples of the csharp api class Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryChannelBase.StartOpenTelemetry(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: ApplicationInsights-SDK-Labs
Source File: ClientTelemetryChannelBase.cs
public IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
        {
            WcfClientEventSource.Log.ChannelCalled(GetType().FullName, nameof(this.BeginOpen));
            this.HookChannelEvents();
            var telemetry = this.StartOpenTelemetry(nameof(this.BeginOpen));
            try
            {
                return new OpenAsyncResult(this.InnerChannel, timeout, this.OpenCompleted, callback, state, telemetry);
            }
            catch (Exception ex)
            {
                this.StopOpenTelemetry(telemetry, ex, nameof(this.BeginOpen));
                throw;
            }
        }

2. Example

Project: ApplicationInsights-SDK-Labs
Source File: ClientTelemetryChannelBase.cs
public void Open(TimeSpan timeout)
        {
            WcfClientEventSource.Log.ChannelCalled(GetType().FullName, nameof(this.Open));
            this.HookChannelEvents();
            var telemetry = this.StartOpenTelemetry(nameof(this.Open));
            try
            {
                this.InnerChannel.Open(timeout);

                if (!this.ChannelManager.IgnoreChannelEvents)
                {
                    this.StopOpenTelemetry(telemetry, null, nameof(this.Open));
                }
            }
            catch (Exception ex)
            {
                // if an exception happened, we still want to report it
                this.StopOpenTelemetry(telemetry, ex, nameof(this.Open));
                throw;
            }
        }