public override int HandleReply(UIH.Mcsf.Core.IAsyncResult pAsyncResult) { if (null == pAsyncResult) { if (null != ContaineeUtility._feCmdCallbackList) { ContaineeUtility._feCmdCallbackList.Remove(this); } GlobalDefinition.LoggerWrapper.LogDevError("ICommandCallbackHandler's pAsyncResult is null."); return(0); } else { GlobalDefinition.LoggerWrapper.LogDevInfo("Receive the Callback Command from other containee."); } if (handler != null) { handler(pAsyncResult.GetStringObject()); GlobalDefinition.LoggerWrapper.LogDevInfo(pAsyncResult.GetStringObject()); handler = null; } if (null != ContaineeUtility._feCmdCallbackList) { ContaineeUtility._feCmdCallbackList.Remove(this); } return(0); }
public override int HandleReply(UIH.Mcsf.Core.IAsyncResult pAsyncResult) { if (pAsyncResult.GetCallResult() == Mcsf.Core.IAsyncResult.CallResult.ReceiveResponse) { if (_callbackOnBytes != null) { _callbackOnBytes(pAsyncResult.GetSerializedObject()); } if (_callbackOnString != null) { _callbackOnString(pAsyncResult.GetStringObject()); } return(NO_ERROR); } else { return(TIMEOUT); } }
/// <inheritdoc /> public override int HandleReply(IAsyncResult pAsyncResult) { this.LogDevInfo(string.Format("Reply is : [{0}]", pAsyncResult.GetStringObject())); return(base.HandleReply(pAsyncResult)); }