ClientBase(Of TChannel).ChannelBase(Of T).ICommunicationObject.BeginClose Method (TimeSpan, AsyncCallback, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Begins an asynchronous operation to close a communication object with a specified time-out.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
'Declaration Private Function BeginClose ( _ timeout As TimeSpan, _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult Implements ICommunicationObject.BeginClose
Parameters
- timeout
- Type: System.TimeSpan
The TimeSpan that specifies how long the send operation has to complete before timing out.
- callback
- Type: System.AsyncCallback
The AsyncCallback delegate that receives notification of the completion of the asynchronous close operation.
- state
- Type: System.Object
An object, specified by the application, that contains state information associated with the asynchronous close operation.
Return Value
Type: System.IAsyncResultThe IAsyncResult that references the asynchronous close operation.
Implements
ICommunicationObject.BeginClose(TimeSpan, AsyncCallback, Object)This method causes an ICommunicationObject to gracefully transition from any state, other than the Opened state to the Closed state within a specified interval of time. The BeginClose method allows any unfinished work to be completed before returning. (For example, finish sending any buffered messages.)