Ejemplo n.º 1
0
 public AgentToc Read(DAIIO io)
 {
     xLength    = io.ReadBit2(LengthBits);
     AgentCount = io.ReadBit2(0x4);
     Agents     = new AgentEntry[AgentCount];
     for (int i = 0; i < AgentCount; i++)
     {
         Agents[i] = new AgentEntry().Read(io);
     }
     return(this);
 }
Ejemplo n.º 2
0
        public bool Write(DAIIO io, bool skiplength = false)
        {
            if (!skiplength)
            {
                io.WriteBits(Length, LengthBits);
            }
            if (Agents == null)
            {
                Agents = new AgentEntry[AgentCount];

                for (int xb = 0; xb < AgentCount; xb++)
                {
                    Agents[xb] = new AgentEntry();
                }
            }
            AgentCount = Agents.Length;
            io.WriteBits(AgentCount, 0x4);
            for (int i = 0; i < AgentCount; i++)
            {
                Agents[i].Write(io);
            }
            return(true);
        }