コード例 #1
0
            public void addword_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                addword_args args = new addword_args();

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

                try
                {
                    result.Success = iface_.addword(args.Word1, args.Word2);
                    oprot.WriteMessageBegin(new TMessage("addword", 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("addword", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
コード例 #2
0
            public void send_addword(string word1, string word2)
            {
                oprot_.WriteMessageBegin(new TMessage("addword", TMessageType.Call, seqid_));
                addword_args args = new addword_args();

                args.Word1 = word1;
                args.Word2 = word2;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                oprot_.Transport.Flush();
            }
コード例 #3
0
            public IAsyncResult send_addword(AsyncCallback callback, object state, string word1, string word2)
            {
                oprot_.WriteMessageBegin(new TMessage("addword", TMessageType.Call, seqid_));
                addword_args args = new addword_args();

                args.Word1 = word1;
                args.Word2 = word2;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                return(oprot_.Transport.BeginFlush(callback, state));
            }