public void HandleMethodResponse(Broker broker, IDecoder decoder, long sequence) { long code = decoder.ReadUint32(); string text = decoder.ReadStr16(); Dictionary <string, object> outArgs = new Dictionary <string, object>(); object obj = SequenceManager.Release(sequence); if (obj == null) { return; } KeyValuePair <SchemaMethod, bool> pair = (KeyValuePair <SchemaMethod, bool>)obj; if (code == 0) { foreach (SchemaArgument arg in pair.Key.Arguments) { if (arg.IsOutput()) { outArgs.Add(arg.Name, this.DecodeValue(decoder, arg.Type)); } } } MethodResult result = new MethodResult(code, text, outArgs); if (pair.Value) { this.SyncResult = result; broker.SetSyncInFlight(false); } if (Console != null) { Console.MethodResponse(broker, sequence, result); } }
public void HandleMethodResponse(Broker broker, IDecoder decoder, long sequence) { long code = decoder.ReadUint32() ; string text = decoder.ReadStr16() ; Dictionary<string, object> outArgs = new Dictionary<string, object>() ; object obj = SequenceManager.Release(sequence) ; if (obj == null) { return ; } KeyValuePair<SchemaMethod, bool> pair = (KeyValuePair<SchemaMethod, bool>) obj ; if (code == 0) { foreach (SchemaArgument arg in pair.Key.Arguments) { if (arg.IsOutput()) { outArgs.Add(arg.Name, this.DecodeValue(decoder, arg.Type)) ; } } } MethodResult result = new MethodResult(code, text, outArgs) ; if (pair.Value) { this.SyncResult = result; broker.SetSyncInFlight(false) ; } if (Console != null) { Console.MethodResponse(broker, sequence, result) ; } }
public virtual void MethodResponse(Broker broker, long seq, MethodResult response) { }
public virtual void MethodResponse(Broker broker, long seq, MethodResult response) {}