예제 #1
0
   public SnsFriends getSnsFriends(SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
   {
 #if SILVERLIGHT
       var asyncResult = Begin_getSnsFriends(null, null, snsIdType, snsAccessToken, startIdx, limit);
       return(End_getSnsFriends(asyncResult));
 #else
       send_getSnsFriends(snsIdType, snsAccessToken, startIdx, limit);
       return(recv_getSnsFriends());
 #endif
   }
예제 #2
0
   public SnsProfile getSnsMyProfile(SnsIdType snsIdType, string snsAccessToken)
   {
 #if SILVERLIGHT
       var asyncResult = Begin_getSnsMyProfile(null, null, snsIdType, snsAccessToken);
       return(End_getSnsMyProfile(asyncResult));
 #else
       send_getSnsMyProfile(snsIdType, snsAccessToken);
       return(recv_getSnsMyProfile());
 #endif
   }
예제 #3
0
   public void postSnsInvitationMessage(SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
   {
 #if SILVERLIGHT
       var asyncResult = Begin_postSnsInvitationMessage(null, null, snsIdType, snsAccessToken, toSnsUserId);
       End_postSnsInvitationMessage(asyncResult);
 #else
       send_postSnsInvitationMessage(snsIdType, snsAccessToken, toSnsUserId);
       recv_postSnsInvitationMessage();
 #endif
   }
예제 #4
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        SnsUserId = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        SnsUserName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        SnsIdType = (SnsIdType)iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #5
0
        public void send_getSnsMyProfile(SnsIdType snsIdType, string snsAccessToken)
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsMyProfile", TMessageType.Call, seqid_));
            getSnsMyProfile_args args = new getSnsMyProfile_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
예제 #6
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Bool)
                    {
                        PhoneNumberRegistered = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            RegisteredSnsIdTypes = new List <SnsIdType>();
                            TList _list81 = iprot.ReadListBegin();
                            for (int _i82 = 0; _i82 < _list81.Count; ++_i82)
                            {
                                SnsIdType _elem83 = (SnsIdType)0;
                                _elem83 = (SnsIdType)iprot.ReadI32();
                                RegisteredSnsIdTypes.Add(_elem83);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #7
0
        public void send_postSnsInvitationMessage(SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
        {
            oprot_.WriteMessageBegin(new TMessage("postSnsInvitationMessage", TMessageType.Call, seqid_));
            postSnsInvitationMessage_args args = new postSnsInvitationMessage_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.ToSnsUserId    = toSnsUserId;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
예제 #8
0
        public void send_getSnsFriends(SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsFriends", TMessageType.Call, seqid_));
            getSnsFriends_args args = new getSnsFriends_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.StartIdx       = startIdx;
            args.Limit          = limit;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
예제 #9
0
        public IAsyncResult send_getSnsFriends(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsFriends", TMessageType.Call, seqid_));
            getSnsFriends_args args = new getSnsFriends_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.StartIdx       = startIdx;
            args.Limit          = limit;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            return(oprot_.Transport.BeginFlush(callback, state));
        }
예제 #10
0
        public void send_getSnsMyProfile(SnsIdType snsIdType, string snsAccessToken)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsMyProfile", TMessageType.Call, seqid_));
            getSnsMyProfile_args args = new getSnsMyProfile_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
예제 #11
0
        public void send_postSnsInvitationMessage(SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("postSnsInvitationMessage", TMessageType.Call, seqid_));
            postSnsInvitationMessage_args args = new postSnsInvitationMessage_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.ToSnsUserId    = toSnsUserId;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
예제 #12
0
        public void send_getSnsFriends(SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
    #endif
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsFriends", TMessageType.Call, seqid_));
            getSnsFriends_args args = new getSnsFriends_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.StartIdx       = startIdx;
            args.Limit          = limit;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
      #if SILVERLIGHT
            return(oprot_.Transport.BeginFlush(callback, state));
      #else
            oprot_.Transport.Flush();
      #endif
        }
예제 #13
0
        public async Task <SnsFriends> getSnsFriendsAsync(SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit, CancellationToken cancellationToken)
        {
            await OutputProtocol.WriteMessageBeginAsync(new TMessage("getSnsFriends", TMessageType.Call, SeqId), cancellationToken);

            var args = new getSnsFriendsArgs();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.StartIdx       = startIdx;
            args.Limit          = limit;

            await args.WriteAsync(OutputProtocol, cancellationToken);

            await OutputProtocol.WriteMessageEndAsync(cancellationToken);

            await OutputProtocol.Transport.FlushAsync(cancellationToken);

            var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken);

            if (msg.Type == TMessageType.Exception)
            {
                var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);

                await InputProtocol.ReadMessageEndAsync(cancellationToken);

                throw x;
            }

            var result = new getSnsFriendsResult();
            await result.ReadAsync(InputProtocol, cancellationToken);

            await InputProtocol.ReadMessageEndAsync(cancellationToken);

            if (result.__isset.success)
            {
                return(result.Success);
            }
            if (result.__isset.e)
            {
                throw result.E;
            }
            throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getSnsFriends failed: unknown result");
        }
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.contact)
            {
                hashcode = (hashcode * 397) + Contact.GetHashCode();
            }
            if (__isset.snsIdType)
            {
                hashcode = (hashcode * 397) + SnsIdType.GetHashCode();
            }
            if (__isset.snsUserId)
            {
                hashcode = (hashcode * 397) + SnsUserId.GetHashCode();
            }
        }
        return(hashcode);
    }
예제 #15
0
        public async Task postSnsInvitationMessageAsync(SnsIdType snsIdType, string snsAccessToken, string toSnsUserId, CancellationToken cancellationToken)
        {
            await OutputProtocol.WriteMessageBeginAsync(new TMessage("postSnsInvitationMessage", TMessageType.Call, SeqId), cancellationToken);

            var args = new postSnsInvitationMessageArgs();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.ToSnsUserId    = toSnsUserId;

            await args.WriteAsync(OutputProtocol, cancellationToken);

            await OutputProtocol.WriteMessageEndAsync(cancellationToken);

            await OutputProtocol.Transport.FlushAsync(cancellationToken);

            var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken);

            if (msg.Type == TMessageType.Exception)
            {
                var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);

                await InputProtocol.ReadMessageEndAsync(cancellationToken);

                throw x;
            }

            var result = new postSnsInvitationMessageResult();
            await result.ReadAsync(InputProtocol, cancellationToken);

            await InputProtocol.ReadMessageEndAsync(cancellationToken);

            if (result.__isset.e)
            {
                throw result.E;
            }
            return;
        }
예제 #16
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("SnsFriendContactRegistration(");
        bool __first = true;

        if (Contact != null && __isset.contact)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Contact: ");
            Contact.ToString(sb);
        }
        if (__isset.snsIdType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SnsIdType: ");
            SnsIdType.ToString(sb);
        }
        if (SnsUserId != null && __isset.snsUserId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SnsUserId: ");
            SnsUserId.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
예제 #17
0
 public IAsyncResult send_findSnsIdUserStatus(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, string udidHash)
예제 #18
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           SnsUserId = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           SnsUserName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           SnsIdType = (SnsIdType)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
예제 #19
0
 public IAsyncResult send_getSnsFriends(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
예제 #20
0
 public IAsyncResult send_postSnsInvitationMessage(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
예제 #21
0
 public IAsyncResult send_getSnsMyProfile(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken)
예제 #22
0
 public IAsyncResult send_removeSnsId(AsyncCallback callback, object state, SnsIdType snsIdType)
예제 #23
0
 public void send_removeSnsId(SnsIdType snsIdType)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("removeSnsId", TMessageType.Call, seqid_));
   removeSnsId_args args = new removeSnsId_args();
   args.SnsIdType = snsIdType;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #24
0
 public IAsyncResult Begin_removeSnsId(AsyncCallback callback, object state, SnsIdType snsIdType)
 {
   return send_removeSnsId(callback, state, snsIdType);
 }
예제 #25
0
      public string removeSnsId(SnsIdType snsIdType)
      {
        #if !SILVERLIGHT
        send_removeSnsId(snsIdType);
        return recv_removeSnsId();

        #else
        var asyncResult = Begin_removeSnsId(null, null, snsIdType);
        return End_removeSnsId(asyncResult);

        #endif
      }
예제 #26
0
    public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);

            while (true)
            {
                field = await iprot.ReadFieldBeginAsync(cancellationToken);

                if (field.Type == TType.Stop)
                {
                    break;
                }

                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        SnsUserId = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        SnsUserName = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        SnsIdType = (SnsIdType)await iprot.ReadI32Async(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                default:
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                    break;
                }

                await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
예제 #27
0
 public void send_registerWithSnsIdAndIdentityCredential(SnsIdType snsIdType, string snsAccessToken, IdentityCredential identityCredential, string region, string udidHash, DeviceInfo deviceInfo)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("registerWithSnsIdAndIdentityCredential", TMessageType.Call, seqid_));
   registerWithSnsIdAndIdentityCredential_args args = new registerWithSnsIdAndIdentityCredential_args();
   args.SnsIdType = snsIdType;
   args.SnsAccessToken = snsAccessToken;
   args.IdentityCredential = identityCredential;
   args.Region = region;
   args.UdidHash = udidHash;
   args.DeviceInfo = deviceInfo;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #28
0
 public IAsyncResult Begin_addSnsId(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken)
 {
   return send_addSnsId(callback, state, snsIdType, snsAccessToken);
 }
예제 #29
0
      public string addSnsId(SnsIdType snsIdType, string snsAccessToken)
      {
        #if !SILVERLIGHT
        send_addSnsId(snsIdType, snsAccessToken);
        return recv_addSnsId();

        #else
        var asyncResult = Begin_addSnsId(null, null, snsIdType, snsAccessToken);
        return End_addSnsId(asyncResult);

        #endif
      }
예제 #30
0
 public IAsyncResult send_addSnsId(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken)
예제 #31
0
 public void send_addSnsId(SnsIdType snsIdType, string snsAccessToken)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("addSnsId", TMessageType.Call, seqid_));
   addSnsId_args args = new addSnsId_args();
   args.SnsIdType = snsIdType;
   args.SnsAccessToken = snsAccessToken;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #32
0
      public SnsIdUserStatus findSnsIdUserStatus(SnsIdType snsIdType, string snsAccessToken, string udidHash)
      {
        #if !SILVERLIGHT
        send_findSnsIdUserStatus(snsIdType, snsAccessToken, udidHash);
        return recv_findSnsIdUserStatus();

        #else
        var asyncResult = Begin_findSnsIdUserStatus(null, null, snsIdType, snsAccessToken, udidHash);
        return End_findSnsIdUserStatus(asyncResult);

        #endif
      }
예제 #33
0
 public IAsyncResult Begin_getSnsMyProfile(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken)
 {
     return(send_getSnsMyProfile(callback, state, snsIdType, snsAccessToken));
 }
예제 #34
0
 public void send_findSnsIdUserStatus(SnsIdType snsIdType, string snsAccessToken, string udidHash)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("findSnsIdUserStatus", TMessageType.Call, seqid_));
   findSnsIdUserStatus_args args = new findSnsIdUserStatus_args();
   args.SnsIdType = snsIdType;
   args.SnsAccessToken = snsAccessToken;
   args.UdidHash = udidHash;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #35
0
        public IAsyncResult send_getSnsMyProfile(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken)
        {
            oprot_.WriteMessageBegin(new TMessage("getSnsMyProfile", TMessageType.Call, seqid_));
            getSnsMyProfile_args args = new getSnsMyProfile_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            return(oprot_.Transport.BeginFlush(callback, state));
        }
예제 #36
0
      public RegisterWithSnsIdResult registerWithSnsId(SnsIdType snsIdType, string snsAccessToken, string region, string udidHash, DeviceInfo deviceInfo, string mid)
      {
        #if !SILVERLIGHT
        send_registerWithSnsId(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid);
        return recv_registerWithSnsId();

        #else
        var asyncResult = Begin_registerWithSnsId(null, null, snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid);
        return End_registerWithSnsId(asyncResult);

        #endif
      }
예제 #37
0
 public IAsyncResult Begin_postSnsInvitationMessage(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
 {
     return(send_postSnsInvitationMessage(callback, state, snsIdType, snsAccessToken, toSnsUserId));
 }
예제 #38
0
 public IAsyncResult send_registerWithSnsId(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, string region, string udidHash, DeviceInfo deviceInfo, string mid)
예제 #39
0
        public IAsyncResult send_postSnsInvitationMessage(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, string toSnsUserId)
        {
            oprot_.WriteMessageBegin(new TMessage("postSnsInvitationMessage", TMessageType.Call, seqid_));
            postSnsInvitationMessage_args args = new postSnsInvitationMessage_args();

            args.SnsIdType      = snsIdType;
            args.SnsAccessToken = snsAccessToken;
            args.ToSnsUserId    = toSnsUserId;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            return(oprot_.Transport.BeginFlush(callback, state));
        }
예제 #40
0
      public string registerWithSnsIdAndIdentityCredential(SnsIdType snsIdType, string snsAccessToken, IdentityCredential identityCredential, string region, string udidHash, DeviceInfo deviceInfo)
      {
        #if !SILVERLIGHT
        send_registerWithSnsIdAndIdentityCredential(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo);
        return recv_registerWithSnsIdAndIdentityCredential();

        #else
        var asyncResult = Begin_registerWithSnsIdAndIdentityCredential(null, null, snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo);
        return End_registerWithSnsIdAndIdentityCredential(asyncResult);

        #endif
      }
예제 #41
0
 public IAsyncResult Begin_getSnsFriends(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit)
 {
     return(send_getSnsFriends(callback, state, snsIdType, snsAccessToken, startIdx, limit));
 }
예제 #42
0
 public IAsyncResult send_registerWithSnsIdAndIdentityCredential(AsyncCallback callback, object state, SnsIdType snsIdType, string snsAccessToken, IdentityCredential identityCredential, string region, string udidHash, DeviceInfo deviceInfo)