public IAsyncResult BeginAsyncWhisperResultFromApp(long toCID, int resultNo, string receiverName, AsyncCallback callback, object asyncState) { WhisperAsyncResult whisperAsyncResult = new WhisperAsyncResult(callback, asyncState); if (this.WhisperedAsync != null) { WhisperResultAsyncEventArg e = new WhisperResultAsyncEventArg { ToCID = toCID, ResultNo = resultNo, ReceiverName = receiverName, AsyncResult = whisperAsyncResult, Callback = new WhisperCompleted(this.WhisperCallback) }; this.WhisperResultAsync(this, e); return(whisperAsyncResult); } IAsyncResult result; try { result = whisperAsyncResult; } finally { whisperAsyncResult.Complete(); } return(result); }
private void WhisperResultFromAppAsync(RelayClient client, WhisperResultAsyncEventArg arg) { bool flag = this.WhipserResultToGameClient(arg.ToCID, arg.ResultNo, arg.ReceiverName); Log <TalkService> .Logger.InfoFormat("WhisperResultFromAppAsync is called. [returnValue: {0}]", flag); arg.Callback(flag, arg.AsyncResult); }