private void OnRealCommandUpdated(object sender, RealCommandArgs args) { if (this.RealCommandReturned != null) { this.RealCommandReturned(this, args); } }
void rp_RealCommandUpdated(object sender, RealCommandArgs args) { PageLogger.RecordDebugLog(String.Format("Result of Command RequestID:{0}, Result:{1}", args.RealRequestID, args.IsSuccessed)); SetExecResultToCommand(args.RealRequestID, args.IsSuccessed); }
protected override void onReceived(StateObject so, int len) { if (len == 12) return; Byte[] resultData = so.buffer.Take<Byte>(len).ToArray<Byte>(); int ContentLen = BitConverter.ToInt32(resultData, 8); Byte[] content = new Byte[ContentLen]; Array.Copy(resultData, 12, content, 0, ContentLen); //content = ZLibProvider.DecompressBytes(content); Guid g = new Guid(string.Join("", Encoding.ASCII.GetChars(content, 0, 38))); Boolean isSucced = BitConverter.ToBoolean(resultData, 39); RealCommandArgs esa = new RealCommandArgs(); esa.IsSuccessed = isSucced; esa.RealRequestID = g; OnRealCommandUpdated(this, esa); }