Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
             }
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Called when the entire element has been deserialized.
 /// </summary>
 public virtual void OnDeserialization(FileSchema schema)
 {
 }