コード例 #1
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        SquareChat = new SquareChat();
                        SquareChat.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        SquareChatStatus = new SquareChatStatus();
                        SquareChatStatus.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        SquareChatMember = new SquareChatMember();
                        SquareChatMember.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
コード例 #2
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.List)
                    {
                        {
                            Chats = new List <SquareChat>();
                            TList _list591 = iprot.ReadListBegin();
                            for (int _i592 = 0; _i592 < _list591.Count; ++_i592)
                            {
                                SquareChat _elem593;
                                _elem593 = new SquareChat();
                                _elem593.Read(iprot);
                                Chats.Add(_elem593);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            ChatMembers = new Dictionary <string, SquareChatMember>();
                            TMap _map594 = iprot.ReadMapBegin();
                            for (int _i595 = 0; _i595 < _map594.Count; ++_i595)
                            {
                                string           _key596;
                                SquareChatMember _val597;
                                _key596 = iprot.ReadString();
                                _val597 = new SquareChatMember();
                                _val597.Read(iprot);
                                ChatMembers[_key596] = _val597;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            Statuses = new Dictionary <string, SquareChatStatus>();
                            TMap _map598 = iprot.ReadMapBegin();
                            for (int _i599 = 0; _i599 < _map598.Count; ++_i599)
                            {
                                string           _key600;
                                SquareChatStatus _val601;
                                _key600 = iprot.ReadString();
                                _val601 = new SquareChatStatus();
                                _val601.Read(iprot);
                                Statuses[_key600] = _val601;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
コード例 #3
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.List)
                    {
                        {
                            Chats = new List <SquareChat>();
                            TList _list503 = iprot.ReadListBegin();
                            for (int _i504 = 0; _i504 < _list503.Count; ++_i504)
                            {
                                SquareChat _elem505;
                                _elem505 = new SquareChat();
                                _elem505.Read(iprot);
                                Chats.Add(_elem505);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            ChatMembers = new Dictionary <string, SquareChatMember>();
                            TMap _map506 = iprot.ReadMapBegin();
                            for (int _i507 = 0; _i507 < _map506.Count; ++_i507)
                            {
                                string           _key508;
                                SquareChatMember _val509;
                                _key508 = iprot.ReadString();
                                _val509 = new SquareChatMember();
                                _val509.Read(iprot);
                                ChatMembers[_key508] = _val509;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            Statuses = new Dictionary <string, SquareChatStatus>();
                            TMap _map510 = iprot.ReadMapBegin();
                            for (int _i511 = 0; _i511 < _map510.Count; ++_i511)
                            {
                                string           _key512;
                                SquareChatStatus _val513;
                                _key512 = iprot.ReadString();
                                _val513 = new SquareChatStatus();
                                _val513.Read(iprot);
                                Statuses[_key512] = _val513;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
コード例 #4
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Set)
                    {
                        {
                            UpdatedAttrs = new THashSet <SquareChatAttribute>();
                            TSet _set563 = iprot.ReadSetBegin();
                            for (int _i564 = 0; _i564 < _set563.Count; ++_i564)
                            {
                                SquareChatAttribute _elem565;
                                _elem565 = (SquareChatAttribute)iprot.ReadI32();
                                UpdatedAttrs.Add(_elem565);
                            }
                            iprot.ReadSetEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        SquareChat = new SquareChat();
                        SquareChat.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
コード例 #5
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.List)
                    {
                        {
                            SquareChats = new List <SquareChat>();
                            TList _list408 = iprot.ReadListBegin();
                            for (int _i409 = 0; _i409 < _list408.Count; ++_i409)
                            {
                                SquareChat _elem410;
                                _elem410 = new SquareChat();
                                _elem410.Read(iprot);
                                SquareChats.Add(_elem410);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

                case 4:
                    if (field.Type == TType.Map)
                    {
                        {
                            SquareChatStatuses = new Dictionary <string, SquareChatStatus>();
                            TMap _map411 = iprot.ReadMapBegin();
                            for (int _i412 = 0; _i412 < _map411.Count; ++_i412)
                            {
                                string           _key413;
                                SquareChatStatus _val414;
                                _key413 = iprot.ReadString();
                                _val414 = new SquareChatStatus();
                                _val414.Read(iprot);
                                SquareChatStatuses[_key413] = _val414;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }