Export (0) Print
Expand All

Terminating a Conversation

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Applications can terminate a conversation using the BeginTerminate() method. Although the platform can terminate a conversation (indicated by the StateChanged event), the best practice is for the application to terminate a conversation. If an application terminates an endpoint, all calls, conference invitations and the conference session are automatically terminated.

The following code example demonstrates terminating an existing conversation.


Conversation conversation = new Conversation(endpoint);
…
conversation.BeginTerminate(Conversation_TerminateCompleted, conversation);

void Conversation_TerminateCompleted(IAsyncResult asyncResult)
{
    Conversation conversation = asyncResult.AsyncState as Conversation;
    conversation.EndTerminate(asyncResult);    // Should not throw.
}

NoteNote

Although a ConferenceSession can be terminated directly, the best practice is instead to terminate the Conversation, as shown in the previous code example.

Show:
© 2015 Microsoft