public override void OnDeserialization(FileSchema schema) { foreach (StructElement s in schema.Structs) { // The array element is a struct. if (s.Name == DataType) { DataElement = s; return; } } // Treat specified DataType as FieldElement. FieldElement field = new FieldElement(); field.DataType = DataType; field.FormatType = FormatType; field.Name = "ArrayElement"; DataElement = field; }
public override void OnDeserialization(FileSchema schema) { if (Elements != null) { foreach (Element elem in Elements) { elem.OnDeserialization(schema); } } else if (DataType != null) { foreach (StructElement s in schema.Structs) { if (s.Name == DataType) { Elements = s.Elements; } } } }
/// <summary> /// Called when the entire element has been deserialized. /// </summary> public virtual void OnDeserialization(FileSchema schema) { }