コード例 #1
0
ファイル: imageProcService.cs プロジェクト: ykoshimizu/Demo
            public void Revert_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                Revert_args args = new Revert_args();

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

                try
                {
                    result.Success = this.iface_.Revert(args.Image, args.Width, args.Height);
                    oprot.WriteMessageBegin(new TMessage("Revert", 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("Revert", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
コード例 #2
0
ファイル: imageProcService.cs プロジェクト: ykoshimizu/Demo
            public void send_Revert(byte[] image, int width, int height)
#endif
            {
                this.oprot_.WriteMessageBegin(new TMessage("Revert", TMessageType.Call, this.seqid_));
                Revert_args args = new Revert_args();

                args.Image  = image;
                args.Width  = width;
                args.Height = height;
                args.Write(this.oprot_);
                this.oprot_.WriteMessageEnd();
#if SILVERLIGHT
                return(oprot_.Transport.BeginFlush(callback, state));
      #else
                this.oprot_.Transport.Flush();
#endif
            }