示例#1
0
        public void add_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            add_args args = new add_args();

            args.Read(iprot);
            iprot.ReadMessageEnd();
            add_result result = new add_result();

            try
            {
                result.Success = iface_.@add(args.Num1, args.Num2);
                oprot.WriteMessageBegin(new TMessage("add", TMessageType.Reply, seqid));
                result.Write(oprot);
            }
            catch (TTransportException)
            {
                throw;
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error occurred in processor:");
                Console.Error.WriteLine(ex.ToString());
                TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error.");
                oprot.WriteMessageBegin(new TMessage("add", TMessageType.Exception, seqid));
                x.Write(oprot);
            }
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
示例#2
0
        public void add_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            add_args args = new add_args();

            args.Read(iprot);
            iprot.ReadMessageEnd();
            add_result result = new add_result();

            result.Success = iface_.add(args.Num1, args.Num2);
            oprot.WriteMessageBegin(new TMessage("add", TMessageType.Reply, seqid));
            result.Write(oprot);
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
示例#3
0
        public int recv_add()
        {
            TMessage msg = iprot_.ReadMessageBegin();

            if (msg.Type == TMessageType.Exception)
            {
                TApplicationException x = TApplicationException.Read(iprot_);
                iprot_.ReadMessageEnd();
                throw x;
            }
            add_result result = new add_result();

            result.Read(iprot_);
            iprot_.ReadMessageEnd();
            if (result.__isset.success)
            {
                return(result.Success);
            }
            throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "add failed: unknown result");
        }
 public void add_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
     add_args args = new add_args();
     args.Read(iprot);
     iprot.ReadMessageEnd();
     add_result result = new add_result();
     try {
       iface_.add(args.Key, args.Column_parent, args.Column, args.Consistency_level);
     } catch (InvalidRequestException ire) {
       result.Ire = ire;
     } catch (UnavailableException ue) {
       result.Ue = ue;
     } catch (TimedOutException te) {
       result.Te = te;
     }
     oprot.WriteMessageBegin(new TMessage("add", TMessageType.Reply, seqid));
     result.Write(oprot);
     oprot.WriteMessageEnd();
     oprot.Transport.Flush();
 }
 public void recv_add()
 {
     TMessage msg = iprot_.ReadMessageBegin();
     if (msg.Type == TMessageType.Exception) {
       TApplicationException x = TApplicationException.Read(iprot_);
       iprot_.ReadMessageEnd();
       throw x;
     }
     add_result result = new add_result();
     result.Read(iprot_);
     iprot_.ReadMessageEnd();
     if (result.__isset.ire) {
       throw result.Ire;
     }
     if (result.__isset.ue) {
       throw result.Ue;
     }
     if (result.__isset.te) {
       throw result.Te;
     }
     return;
 }
 public void add_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   add_args args = new add_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   add_result result = new add_result();
   result.Success = iface_.@add(args.Num1, args.Num2);
   oprot.WriteMessageBegin(new TMessage("add", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
 public int recv_add()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   add_result result = new add_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.success) {
     return result.Success;
   }
   throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "add failed: unknown result");
 }