ChannelFactoryBase<TChannel>.OnClose Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Closes all the channels associated with the channel factory within a specified interval of time.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
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.