Exemple #1
0
        public BinaryChunkPROP(BinaryChunk chunk)
        {
            chunk.AssertChunkType(BinaryChunkType.PROP);
            reader = chunk.GetReader();

            Index  = reader.ReadInt32();
            Name   = BinaryFile.ReadString(reader);
            Format = (BinaryPropertyFormat)(reader.ReadByte());
        }
Exemple #2
0
        public BinaryChunkINST(BinaryChunk chunk)
        {
            chunk.AssertChunkType(BinaryChunkType.INST);

            using (BinaryReader reader = chunk.GetReader())
            {
                TypeIndex    = reader.ReadInt32();
                TypeName     = BinaryFile.ReadString(reader);
                IsService    = reader.ReadBoolean();
                NumInstances = reader.ReadInt32();
                InstanceIds  = BinaryFile.ReadIds(reader, NumInstances);
            }

            Properties = new Dictionary <string, BinaryChunkPROP>();
        }
Exemple #3
0
        public BinaryChunkMETA(BinaryChunk chunk)
        {
            chunk.AssertChunkType(BinaryChunkType.META);
            using (BinaryReader reader = chunk.GetReader())
            {
                Length = reader.ReadInt32();
                Values = new Dictionary <string, string>(Length);

                for (int i = 0; i < Length; i++)
                {
                    string key   = BinaryFile.ReadString(reader);
                    string value = BinaryFile.ReadString(reader);
                    Values.Add(key, value);
                }
            }
        }