public Task <ReturnMessage> StopSpeak() { Task <ReturnMessage> checkTask = _meetingManager.CheckMeetingServerStatus(); if (checkTask != null) { return(checkTask); } var tcs = new TaskCallback <ReturnMessage>("StopSpeak"); if (_meetingManager.TaskCallbacks.ContainsKey(tcs.Name)) { _meetingManager.TaskCallbacks.Remove(tcs.Name); } _meetingManager.TaskCallbacks.Add(tcs.Name, tcs); var result = MeetingAgent.StopSpeak(); if (result != 0) { return(Task.FromResult(MessageManager.FailedToStopSpeak)); } return(tcs.Task); }