Esempio n. 1
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("InvalidRequestException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "why";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Why);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 2
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCChatResultMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "result";
   field.Type = TType.Byte;
   field.ID = 10;
   oprot.WriteFieldBegin(field);
   oprot.WriteByte(Result);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 3
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCSystemInfoMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "systemInfo";
   field.Type = TType.Struct;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   SystemInfo.Write(oprot);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AlreadyAliveException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "msg";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Msg);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 5
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSChatSettingMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "chatSetting";
   field.Type = TType.Struct;
   field.ID = 10;
   oprot.WriteFieldBegin(field);
   ChatSetting.Write(oprot);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("IndexStatusResponse");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "Status";
   field.Type = TType.I32;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteI32((int)Status);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 7
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("LSSupervisorId");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "supervisor_id";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Supervisor_id);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("TowerDefenseStageResult");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.currDefTargetHp) {
     field.Name = "currDefTargetHp";
     field.Type = TType.I32;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(CurrDefTargetHp);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSCharEquipmentLevelUpMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.equipmentUniqueId) {
     field.Name = "equipmentUniqueId";
     field.Type = TType.I64;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteI64(EquipmentUniqueId);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 10
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("HandInfoOpted");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (PlayerHand != null && __isset.playerHand) {
     field.Name = "playerHand";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(PlayerHand);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("ClientUsageMetrics");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.sessions) {
     field.Name = "sessions";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Sessions);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSCompleteMissionStep");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.missionSceneId) {
     field.Name = "missionSceneId";
     field.Type = TType.I32;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(MissionSceneId);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 13
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCHeroCreateOne");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (NewHero != null && __isset.newHero) {
     field.Name = "newHero";
     field.Type = TType.Struct;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     NewHero.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("StoreAggregatesException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Msg != null && __isset.msg) {
     field.Name = "msg";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Msg);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("GetNodeStatisticsReturnStruct");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (_data != null && __isset._data) {
     field.Name = "_data";
     field.Type = TType.Struct;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     _data.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 16
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSHeroMaxExtend");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.extendTimes) {
     field.Name = "extendTimes";
     field.Type = TType.I16;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI16(ExtendTimes);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 17
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("ChatSettingInfo");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.chatSetting) {
     field.Name = "chatSetting";
     field.Type = TType.Byte;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteByte(ChatSetting);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 18
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("BidResponse");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.success) {
     field.Name = "success";
     field.Type = TType.Bool;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteBool(Success);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("EnterGameRequest");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.charId) {
     field.Name = "charId";
     field.Type = TType.I32;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(CharId);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCHeroSkillQualityLevelUpMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (FailSystemInfo != null && __isset.failSystemInfo) {
     field.Name = "failSystemInfo";
     field.Type = TType.Struct;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     FailSystemInfo.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCCharacterJoinArmyMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (MemberInfo != null && __isset.memberInfo) {
     field.Name = "memberInfo";
     field.Type = TType.Struct;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     MemberInfo.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 22
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("IOError");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Message != null && __isset.message) {
     field.Name = "message";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Message);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 23
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSRaidReceiveAwards");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.raidId) {
     field.Name = "raidId";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(RaidId);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 24
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSRegisterMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Username != null && __isset.username) {
     field.Name = "username";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Username);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCSingleSceneCharInfoSyncMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (SceneChar != null && __isset.sceneChar) {
     field.Name = "sceneChar";
     field.Type = TType.Struct;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     SceneChar.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 26
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("SCAddGemMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (GemInfo != null && __isset.gemInfo) {
     field.Name = "gemInfo";
     field.Type = TType.Struct;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     GemInfo.Write(oprot);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSDeleteBlackNameMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.friendId) {
     field.Name = "friendId";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(FriendId);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 28
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("GetInfoOptions");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.num_err_choice) {
     field.Name = "num_err_choice";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)Num_err_choice);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSUpdateArmyBulletinBoardContentMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (BulletinBoardContent != null && __isset.bulletinBoardContent) {
     field.Name = "bulletinBoardContent";
     field.Type = TType.String;
     field.ID = 10;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(BulletinBoardContent);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 30
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CSSelectFriendMsg");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (FriendArr != null && __isset.friendArr) {
     field.Name = "friendArr";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(FriendArr);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
Esempio n. 31
0
 public abstract Task WriteFieldBeginAsync(TField field, CancellationToken cancellationToken);
Esempio n. 32
0
 public virtual async Task WriteFieldBeginAsync(TField field)
 {
     await WriteFieldBeginAsync(field, CancellationToken.None);
 }
Esempio n. 33
0
 public override void WriteFieldBegin(TField field)
 {
     WriteByte((byte)field.Type);
     WriteI16(field.ID);
 }
Esempio n. 34
0
 public override void WriteFieldBegin(TField field)
 {
     this.WriteJSONInteger((long)field.ID);
     this.WriteJSONObjectStart();
     this.WriteJSONString(TJSONProtocol.GetTypeNameForTypeID(field.Type));
 }
Esempio n. 35
0
 public override async Task WriteFieldBeginAsync(TField field, CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     await WriteByteAsync((sbyte)field.Type, cancellationToken);
     await WriteI16Async(field.ID, cancellationToken);
 }
Esempio n. 36
0
 public abstract void WriteFieldBegin(TField field);
Esempio n. 37
0
        public static void Skip(TProtocol prot, TType type)
        {
            switch (type)
            {
            case TType.Bool:
                prot.ReadBool();
                break;

            case TType.Byte:
                prot.ReadByte();
                break;

            case TType.I16:
                prot.ReadI16();
                break;

            case TType.I32:
                prot.ReadI32();
                break;

            case TType.I64:
                prot.ReadI64();
                break;

            case TType.Double:
                prot.ReadDouble();
                break;

            case TType.String:
                // Don't try to decode the string, just skip it.
                prot.ReadBinary();
                break;

            case TType.Struct:
                prot.ReadStructBegin();
                while (true)
                {
                    TField field = prot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    Skip(prot, field.Type);
                    prot.ReadFieldEnd();
                }
                prot.ReadStructEnd();
                break;

            case TType.Map:
                TMap map = prot.ReadMapBegin();
                for (int i = 0; i < map.Count; i++)
                {
                    Skip(prot, map.KeyType);
                    Skip(prot, map.ValueType);
                }
                prot.ReadMapEnd();
                break;

            case TType.Set:
                TSet set = prot.ReadSetBegin();
                for (int i = 0; i < set.Count; i++)
                {
                    Skip(prot, set.ElementType);
                }
                prot.ReadSetEnd();
                break;

            case TType.List:
                TList list = prot.ReadListBegin();
                for (int i = 0; i < list.Count; i++)
                {
                    Skip(prot, list.ElementType);
                }
                prot.ReadListEnd();
                break;
            }
        }
Esempio n. 38
0
 static TCompactProtocol()
 {
     TCompactProtocol.ANONYMOUS_STRUCT   = new TStruct("");
     TCompactProtocol.TSTOP              = new TField("", TType.Stop, 0);
     TCompactProtocol.ttypeToCompactType = new byte[16];
 }
Esempio n. 39
0
 public override void WriteFieldBegin(TField field)
 {
     WriteJSONInteger(field.ID);
     WriteJSONObjectStart();
     WriteJSONString(GetTypeNameForTypeID(field.Type));
 }
Esempio n. 40
0
 public override async Task WriteFieldBeginAsync(TField field, CancellationToken cancellationToken)
 {
     await _wrappedProtocol.WriteFieldBeginAsync(field, cancellationToken);
 }
Esempio n. 41
0
 public override void WriteFieldBegin(TField tField)
 {
     WrappedProtocol.WriteFieldBegin(tField);
 }
Esempio n. 42
0
 public override async Task WriteFieldBeginAsync(TField field, CancellationToken cancellationToken)
 {
     await WriteJsonIntegerAsync(field.ID, cancellationToken);
     await WriteJsonObjectStartAsync(cancellationToken);
     await WriteJsonStringAsync(TJSONProtocolHelper.GetTypeNameForTypeId(field.Type), cancellationToken);
 }
Esempio n. 43
0
        public static void Skip(TProtocol prot, TType type)
        {
            prot.IncrementRecursionDepth();
            try
            {
                switch (type)
                {
                case TType.Bool:
                    prot.ReadBool();
                    break;

                case TType.Byte:
                    prot.ReadByte();
                    break;

                case TType.I16:
                    prot.ReadI16();
                    break;

                case TType.I32:
                    prot.ReadI32();
                    break;

                case TType.I64:
                    prot.ReadI64();
                    break;

                case TType.Double:
                    prot.ReadDouble();
                    break;

                case TType.String:
                    // Don't try to decode the string, just skip it.
                    prot.ReadBinary();
                    break;

                case TType.Struct:
                    prot.ReadStructBegin();
                    while (true)
                    {
                        TField field = prot.ReadFieldBegin();
                        if (field.Type == TType.Stop)
                        {
                            break;
                        }
                        Skip(prot, field.Type);
                        prot.ReadFieldEnd();
                    }
                    prot.ReadStructEnd();
                    break;

                case TType.Map:
                    TMap map = prot.ReadMapBegin();
                    for (int i = 0; i < map.Count; i++)
                    {
                        Skip(prot, map.KeyType);
                        Skip(prot, map.ValueType);
                    }
                    prot.ReadMapEnd();
                    break;

                case TType.Set:
                    TSet set = prot.ReadSetBegin();
                    for (int i = 0; i < set.Count; i++)
                    {
                        Skip(prot, set.ElementType);
                    }
                    prot.ReadSetEnd();
                    break;

                case TType.List:
                    TList list = prot.ReadListBegin();
                    for (int i = 0; i < list.Count; i++)
                    {
                        Skip(prot, list.ElementType);
                    }
                    prot.ReadListEnd();
                    break;

                default:
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "Unknown data type " + type.ToString("d"));
                }
            }
            finally
            {
                prot.DecrementRecursionDepth();
            }
        }