public virtual void OnErrorCallback(int cid, RemoteException exception) { if (!RemoteCallingRecode.ContainsKey(cid)) { return; } RemoteCallingRecode[cid].OnError(exception); RemoteCallingRecode.Remove(cid); }
public virtual void OnAPIReturn(int cid, Stream returnStream) { if (!RemoteCallingRecode.ContainsKey(cid)) { return; } CytarStreamReader cr = new CytarStreamReader(returnStream); if (RemoteCallingRecode[cid].ReturnType == typeof(void)) { RemoteCallingRecode[cid].Return(null); } else { RemoteCallingRecode[cid].Return(cr.ReadObject(RemoteCallingRecode[cid].ReturnType)); } RemoteCallingRecode.Remove(cid); }