Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
		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) ;
			}	
		}	
Esempio n. 3
0
 public virtual void MethodResponse(Broker broker, long seq, MethodResult response)
 {
 }
Esempio n. 4
0
		public virtual void MethodResponse(Broker broker, long seq, MethodResult response) {}