void ICommunicationObject.Close(TimeSpan timeout) { if (State == CommunicationState.Opened) { InnerChannel.Close(timeout); } }
void ICommunicationObject.Close() { if (State == CommunicationState.Opened) { InnerChannel.Close(); } }
public void Close(TimeSpan timeout) { WcfClientEventSource.Log.ChannelCalled(GetType().FullName, nameof(Close)); try { InnerChannel.Close(timeout); } finally { Dispose(true); } }
void ICommunicationObject.Close(TimeSpan timeout) { using (ServiceModelActivity activity = DiagnosticUtility.ShouldUseActivity ? ServiceModelActivity.CreateBoundedActivity() : null) { if (DiagnosticUtility.ShouldUseActivity) { ServiceModelActivity.Start(activity, SR.Format(SR.ActivityCloseClientBase, typeof(TChannel).FullName), ActivityType.Close); } TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); if (_channel != null) { InnerChannel.Close(timeoutHelper.RemainingTime()); } if (!_channelFactoryRefReleased) { lock (s_staticLock) { if (!_channelFactoryRefReleased) { if (_channelFactoryRef.Release()) { _releasedLastRef = true; } _channelFactoryRefReleased = true; } } // Close the factory outside of the lock so that we can abort from a different thread. if (_releasedLastRef) { if (_useCachedFactory) { _channelFactoryRef.Abort(); } else { _channelFactoryRef.Close(timeoutHelper.RemainingTime()); } } } } }
void ICommunicationObject.Close(TimeSpan timeout) { using (ServiceModelActivity activity = DiagnosticUtility.ShouldUseActivity ? ServiceModelActivity.CreateBoundedActivity() : null) { if (DiagnosticUtility.ShouldUseActivity) { ServiceModelActivity.Start(activity, SR.Format(SR.ActivityCloseClientBase, typeof(TChannel).FullName), ActivityType.Close); } TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); if (_channel != null) { InnerChannel.Close(timeoutHelper.RemainingTime()); } ChannelFactory.Close(timeoutHelper.RemainingTime()); } }
void ICommunicationObject.Close(TimeSpan timeout) { InnerChannel.Close(timeout); }
public void Close() { InnerChannel.Close(); }
public void Close(TimeSpan timeout) { InnerChannel.Close(timeout); }
void ICommunicationObject.Close() { InnerChannel.Close(); }