コード例 #1
0
            public ThriftS.IDL.ThriftSResponse recv_Hello()
            {
                TMessage msg = iprot_.ReadMessageBegin();

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

                result.Read(iprot_);
                iprot_.ReadMessageEnd();
                if (result.__isset.success)
                {
                    return(result.Success);
                }
                if (result.__isset.badRequestException)
                {
                    throw result.BadRequestException;
                }
                if (result.__isset.internalServerException)
                {
                    throw result.InternalServerException;
                }
                throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Hello failed: unknown result");
            }
コード例 #2
0
            public string recv_Hello()
            {
                TMessage msg = iprot_.ReadMessageBegin();

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

                result.Read(iprot_);
                iprot_.ReadMessageEnd();
                if (result.__isset.success)
                {
                    return(result.Success);
                }
                throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Hello failed: unknown result");
            }
コード例 #3
0
 public string recv_Hello()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   Hello_result result = new Hello_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.success) {
     return result.Success;
   }
   throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Hello failed: unknown result");
 }