ChannelFactoryBase<TChannel>::OnClose Method (TimeSpan)

 

Closes all the channels associated with the channel factory within a specified interval of time.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

protected:
virtual void OnClose(
	TimeSpan timeout
) override

Parameters

timeout
Type: System::TimeSpan

The TimeSpan that specifies how long the on-close operation has to complete before timing out.

This method sequentially attempts to close all of the active channels associated with the channel factory in no particular order. The timeout parameter is the cumulative amount of time available for closing all of the channels. If a graceful close of one of the channels fails (for example, if the channel is faulted causing an exception to be thrown) then this operation fails and does not attempt to close the remaining channels. Failure in this method causes the factory and any remaining channels to be aborted rather than closed.

This method is called by Close.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: