コード例 #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.String)
                        {
                            SessionId = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Map)
                        {
                            {
                                Content = new Dictionary <string, AFContent>();
                                TMap _map178 = iprot.ReadMapBegin();
                                for (int _i179 = 0; _i179 < _map178.Count; ++_i179)
                                {
                                    string    _key180;
                                    AFContent _val181;
                                    _key180 = iprot.ReadString();
                                    _val181 = new AFContent();
                                    _val181.Read(iprot);
                                    Content[_key180] = _val181;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.I64)
                        {
                            StartDate = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.I64)
                        {
                            EndDate = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map182 = iprot.ReadMapBegin();
                                for (int _i183 = 0; _i183 < _map182.Count; ++_i183)
                                {
                                    string _key184;
                                    string _val185;
                                    _key184             = iprot.ReadString();
                                    _val185             = iprot.ReadString();
                                    Properties[_key184] = _val185;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.Struct)
                        {
                            Target = new SGEntity();
                            Target.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.String)
                        {
                            Id = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Map)
                        {
                            {
                                Content = new Dictionary <string, AFContent>();
                                TMap _map29 = iprot.ReadMapBegin();
                                for (int _i30 = 0; _i30 < _map29.Count; ++_i30)
                                {
                                    string    _key31;
                                    AFContent _val32;
                                    _key31 = iprot.ReadString();
                                    _val32 = new AFContent();
                                    _val32.Read(iprot);
                                    Content[_key31] = _val32;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    case 6:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map33 = iprot.ReadMapBegin();
                                for (int _i34 = 0; _i34 < _map33.Count; ++_i34)
                                {
                                    string _key35;
                                    string _val36;
                                    _key35             = iprot.ReadString();
                                    _val36             = iprot.ReadString();
                                    Properties[_key35] = _val36;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 8:
                        if (field.Type == TType.I64)
                        {
                            CreatedAt = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Bool)
                        {
                            IsAnnouncement = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.Map)
                        {
                            {
                                Mentions = new Dictionary <string, List <AFMention> >();
                                TMap _map37 = iprot.ReadMapBegin();
                                for (int _i38 = 0; _i38 < _map37.Count; ++_i38)
                                {
                                    string           _key39;
                                    List <AFMention> _val40;
                                    _key39 = iprot.ReadString();
                                    {
                                        _val40 = new List <AFMention>();
                                        TList _list41 = iprot.ReadListBegin();
                                        for (int _i42 = 0; _i42 < _list41.Count; ++_i42)
                                        {
                                            AFMention _elem43;
                                            _elem43 = new AFMention();
                                            _elem43.Read(iprot);
                                            _val40.Add(_elem43);
                                        }
                                        iprot.ReadListEnd();
                                    }
                                    Mentions[_key39] = _val40;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    case 13:
                        if (field.Type == TType.I64)
                        {
                            StatusUpdatedAt = iprot.ReadI64();
                        }
                        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.String)
                        {
                            SessionId = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 3:
                        if (field.Type == TType.Map)
                        {
                            {
                                Content = new Dictionary <string, AFContent>();
                                TMap _map140 = iprot.ReadMapBegin();
                                for (int _i141 = 0; _i141 < _map140.Count; ++_i141)
                                {
                                    string    _key142;
                                    AFContent _val143;
                                    _key142 = iprot.ReadString();
                                    _val143 = new AFContent();
                                    _val143.Read(iprot);
                                    Content[_key142] = _val143;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map144 = iprot.ReadMapBegin();
                                for (int _i145 = 0; _i145 < _map144.Count; ++_i145)
                                {
                                    string _key146;
                                    string _val147;
                                    _key146             = iprot.ReadString();
                                    _val147             = iprot.ReadString();
                                    Properties[_key146] = _val147;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Struct)
                        {
                            Target = new SGEntity();
                            Target.Read(iprot);
                        }
                        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.String)
                        {
                            SessionId = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Map)
                        {
                            {
                                Content = new Dictionary <string, AFContent>();
                                TMap _map150 = iprot.ReadMapBegin();
                                for (int _i151 = 0; _i151 < _map150.Count; ++_i151)
                                {
                                    string    _key152;
                                    AFContent _val153;
                                    _key152 = iprot.ReadString();
                                    _val153 = new AFContent();
                                    _val153.Read(iprot);
                                    Content[_key152] = _val153;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map154 = iprot.ReadMapBegin();
                                for (int _i155 = 0; _i155 < _map154.Count; ++_i155)
                                {
                                    string _key156;
                                    string _val157;
                                    _key156             = iprot.ReadString();
                                    _val157             = iprot.ReadString();
                                    Properties[_key156] = _val157;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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