public void ExitChatMode() { if (!sessionEndFlag) { sessionEndFlag = true; if (readCancellationSource != null) { readCancellationSource.Cancel(); } chatClient.MessageReceived -= ChatClient_MessageReceived; chatClient.EndChat().WaitHandled(); } }
public void ExitChatMode() { if (!sessionEndFlag) { sessionEndFlag = true; if (readCancellationSource != null) { readCancellationSource.Cancel(); } chatClient.MessageReceived -= ChatClient_MessageReceived; chatClient.EndChat().WaitHandled(); } }