Пример #1
0
            public void notify_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                notify_args args = new notify_args();

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

                try
                {
                    result.Success = iface_.notify(args.Message);
                    oprot.WriteMessageBegin(new TMessage("notify", 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("notify", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
Пример #2
0
            public void send_notify(string message)
            {
                oprot_.WriteMessageBegin(new TMessage("notify", TMessageType.Call, seqid_));
                notify_args args = new notify_args();

                args.Message = message;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                oprot_.Transport.Flush();
            }
Пример #3
0
            public IAsyncResult send_notify(AsyncCallback callback, object state, string message)
            {
                oprot_.WriteMessageBegin(new TMessage("notify", TMessageType.Call, seqid_));
                notify_args args = new notify_args();

                args.Message = message;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                return(oprot_.Transport.BeginFlush(callback, state));
            }
Пример #4
0
        public void send_notify(GlobalEvent @event)
        {
            oprot_.WriteMessageBegin(new TMessage("notify", TMessageType.Call, seqid_));
            notify_args args = new notify_args();

            args.Event = @event;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
        public void send_notify(GlobalEvent @event)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("notify", TMessageType.Call, seqid_));
            notify_args args = new notify_args();

            args.Event = @event;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }