Exemple #1
0
        public void send_lookupNearby(Location location, SpotCategory category, string query, string countryAreaCode)
        {
            oprot_.WriteMessageBegin(new TMessage("lookupNearby", TMessageType.Call, seqid_));
            lookupNearby_args args = new lookupNearby_args();

            args.Location        = location;
            args.Category        = category;
            args.Query           = query;
            args.CountryAreaCode = countryAreaCode;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
Exemple #2
0
        public IAsyncResult send_lookupNearby(AsyncCallback callback, object state, Location location, SpotCategory category, string query, string countryAreaCode)
        {
            oprot_.WriteMessageBegin(new TMessage("lookupNearby", TMessageType.Call, seqid_));
            lookupNearby_args args = new lookupNearby_args();

            args.Location        = location;
            args.Category        = category;
            args.Query           = query;
            args.CountryAreaCode = countryAreaCode;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            return(oprot_.Transport.BeginFlush(callback, state));
        }
Exemple #3
0
        public void send_lookupNearby(Location location, SpotCategory category, string query, string countryAreaCode)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("lookupNearby", TMessageType.Call, seqid_));
            lookupNearby_args args = new lookupNearby_args();

            args.Location        = location;
            args.Category        = category;
            args.Query           = query;
            args.CountryAreaCode = countryAreaCode;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
Exemple #4
0
        public void lookupNearby_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            lookupNearby_args args = new lookupNearby_args();

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

            try
            {
                try
                {
                    result.Success = iface_.lookupNearby(args.Location, args.Category, args.Query, args.CountryAreaCode);
                }
                catch (TalkException e)
                {
                    result.E = e;
                }
                oprot.WriteMessageBegin(new TMessage("lookupNearby", 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("lookupNearby", TMessageType.Exception, seqid));
                x.Write(oprot);
            }
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }