public virtual void Deserialize(IDataReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = new Types.FightTeamInformations();
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsPositions = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsPositions[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     fightSpectatorLocked = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamLightInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = new Types.FightTeamLightInformations();
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
 public FightCommonInformations(int fightId, sbyte fightType, Types.FightTeamInformations[] fightTeams, short[] fightTeamsPositions, Types.FightOptionsInformations[] fightTeamsOptions)
 {
     this.fightId = fightId;
     this.fightType = fightType;
     this.fightTeams = fightTeams;
     this.fightTeamsPositions = fightTeamsPositions;
     this.fightTeamsOptions = fightTeamsOptions;
 }
 public FightExternalInformations(int fightId, int fightStart, bool fightSpectatorLocked, Types.FightTeamLightInformations[] fightTeams, Types.FightOptionsInformations[] fightTeamsOptions)
 {
     this.fightId = fightId;
     this.fightStart = fightStart;
     this.fightSpectatorLocked = fightSpectatorLocked;
     this.fightTeams = fightTeams;
     this.fightTeamsOptions = fightTeamsOptions;
 }
 public virtual void Deserialize(IDataReader reader)
 {
     fightId = reader.ReadInt();
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     fightSpectatorLocked = reader.ReadBoolean();
     fightTeams = new Types.FightTeamLightInformations[2];
     for (int i = 0; i < 2; i++)
     {
          fightTeams[i] = new Types.FightTeamLightInformations();
          fightTeams[i].Deserialize(reader);
     }
     fightTeamsOptions = new Types.FightOptionsInformations[2];
     for (int i = 0; i < 2; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }