public override void Decode() { MemoryStream stream = new MemoryStream(Data); BinaryReader reader = new BinaryReader(stream); Properties.Clear(); for (int index = 0; index < this.Instance; index++) { Properties.Add(ShapeProperty.Decode(reader)); } foreach (ShapeProperty property in Properties) { if (property.IsComplex) { int size = (int)property.PropertyValue; property.ComplexData = reader.ReadBytes(size); } } }
public override void Decode() { MemoryStream input = new MemoryStream(this.Data); BinaryReader binaryReader = new BinaryReader(input); this.Properties.Clear(); checked { for (int i = 0; i < (int)base.Instance; i++) { this.Properties.Add(ShapeProperty.Decode(binaryReader)); } foreach (ShapeProperty current in this.Properties) { if (current.IsComplex) { int count = (int)current.PropertyValue; current.ComplexData = binaryReader.ReadBytes(count); } } } }