ApplicationEndpoint.BeginDrain Method
Starts declining requests for new conversations on the endpoint.
Namespace: Microsoft.Rtc.Collaboration
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function BeginDrain ( _
userCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As ApplicationEndpoint
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginDrain(userCallback, _
state)
public IAsyncResult BeginDrain(
AsyncCallback userCallback,
Object state
)
Parameters
- userCallback
Type: System.AsyncCallback
The method to be called when all conversations have been terminated or the endpoint exits the Draining state.
- state
Type: System.Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Return Value
Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown when the state of the endpoint is not Established or Reestablishing. |
Remarks
Upon calling the method the endpoint enters the Draining state. In this state new conversations are declined while calls on existing conversations continue to be accepted. When no outstanding conversations remain, the callback is invoked. Application would normally terminate the endpoint after the callback is invoked. However, it is free to terminate the endpoint at any time.