public StructureDescriptor(PsdReader reader, bool hasVersion) { if (hasVersion == true) { this.version = reader.ReadInt32(); } ClassName = reader.ReadString(); ClassId = reader.ReadKey(); Items = new Properties(); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { string key = reader.ReadKey(); string osType = reader.ReadType(); if (key == "EngineData") { Items.Add(key.Trim(), new StructureEngineData(reader)); } else { StructureItem value = StructureReader.Read(osType, reader); Items.Add(key.Trim(), value); } } }
public StructureList(PsdReader reader) { Items = new List <StructureItem>(); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { string type = reader.ReadType(); StructureItem value = StructureReader.Read(type, reader); Items.Add(value); } }
public BaseStructure(PsdReader reader) { List <object> items = new List <object>(); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { string type = reader.ReadType(); object value = StructureReader.Read(type, reader); items.Add(value); } this.Add("Items", items.ToArray()); }