Ejemplo n.º 1
0
        private void Read(Stream input)
        {
            BinaryReader reader            = new BinaryReader(input, Encoding.Default, true);
            uint         magicNumber1      = reader.ReadUInt32();
            uint         magicNumber2      = reader.ReadUInt32();
            int          entityCount       = reader.ReadInt32();
            int          stringTableOffset = reader.ReadInt32();
            int          offsetData        = reader.ReadInt32();

            reader.Skip(12);
            for (int i = 0; i < entityCount; i++)
            {
                FoxEntity entity = FoxEntity.ReadFoxEntity(input);
                _entities.Add(entity);
            }

            FoxStringLookupLiteral stringLookupLiteral;

            while ((stringLookupLiteral = FoxStringLookupLiteral.ReadFoxStringLookupLiteral(input)) != null)
            {
                _stringLookupLiterals.Add(stringLookupLiteral);
            }
            input.AlignRead(16);
            reader.Skip(2);
            byte[] eof = reader.ReadBytes(3);
            input.AlignRead(16);
        }
Ejemplo n.º 2
0
        public static FoxStringLookupLiteral ReadFoxStringLookupLiteral(Stream input)
        {
            FoxStringLookupLiteral stringLookupLiteral = new FoxStringLookupLiteral();

            stringLookupLiteral.Read(input);
            return(stringLookupLiteral.Hash.HashValue == 0 ? null : stringLookupLiteral);
        }
Ejemplo n.º 3
0
 public static FoxStringLookupLiteral ReadFoxStringLookupLiteral(Stream input)
 {
     FoxStringLookupLiteral stringLookupLiteral = new FoxStringLookupLiteral();
     stringLookupLiteral.Read(input);
     return stringLookupLiteral.Hash.HashValue == 0 ? null : stringLookupLiteral;
 }
Ejemplo n.º 4
0
 protected bool Equals(FoxStringLookupLiteral other)
 {
     return Equals(Hash, other.Hash) && string.Equals(Literal, other.Literal) &&
            Equals(EncryptedLiteral, other.EncryptedLiteral);
 }
 protected bool Equals(FoxStringLookupLiteral other)
 {
     return(Equals(Hash, other.Hash) && string.Equals(Literal, other.Literal) &&
            Equals(EncryptedLiteral, other.EncryptedLiteral));
 }