Пример #1
0
        public void Read(Stream s)
        {
            int     count;
            Element e;

            this.Clear();

            count = BinaryAccess.ReadInt(s);

            for (int i = 0; i < count; i++)
            {
                e = new Element();
                e.Read(s);

                TableList.Add(e.Key, e);
            }
        }
Пример #2
0
 public void Read(Stream s)
 {
     Name = BinaryAccess.ReadString(s);
     Type = (enumVariousElement)BinaryAccess.ReadInt(s);
 }
Пример #3
0
            public void Read(Stream s)
            {
                Key = new Key();
                Key.Read(s);

                switch (Key.Type)
                {
                case enumVariousElement.Bool:
                    Value = BinaryAccess.ReadBool(s);
                    break;

                case enumVariousElement.Byte:
                    Value = BinaryAccess.ReadByte(s);
                    break;

                case enumVariousElement.Short:
                    Value = BinaryAccess.ReadShort(s);
                    break;

                case enumVariousElement.UShort:
                    Value = BinaryAccess.ReadUShort(s);
                    break;

                case enumVariousElement.Int:
                    Value = BinaryAccess.ReadInt(s);
                    break;

                case enumVariousElement.UInt:
                    Value = BinaryAccess.ReadUInt(s);
                    break;

                case enumVariousElement.Long:
                    Value = BinaryAccess.ReadLong(s);
                    break;

                case enumVariousElement.ULong:
                    Value = BinaryAccess.ReadULong(s);
                    break;

                case enumVariousElement.Float:
                    Value = BinaryAccess.ReadFloat(s);
                    break;

                case enumVariousElement.Double:
                    Value = BinaryAccess.ReadDouble(s);
                    break;

                case enumVariousElement.String:
                    Value = BinaryAccess.ReadString(s);
                    break;

                case enumVariousElement.Bytes:
                    Value = BinaryAccess.ReadBytes(s);
                    break;

                case enumVariousElement.Table:
                    Value = new VariousTable();
                    ((VariousTable)Value).Read(s);
                    break;
                }
            }