/// <summary> /// Deserialization constructor /// </summary> /// <param name="info">Serialization info</param> /// <param name="context">Streaming context</param> protected AcceleratedPosition(SerializationInfo info, StreamingContext context) { initial = info.GetValue("Initial", typeof(double[])) as double[]; meas = info.GetValue("Measures", typeof(Dictionary <int, string>)) as Dictionary <int, string>; field = RelativeField.Load(info, this); PostConstruct(); isSerialized = true; }
/// <summary> /// Loading /// </summary> /// <param name="info">Serialization info</param> /// <param name="o">Loaded object</param> /// <returns>Result of loading</returns> public static RelativeField Load(SerializationInfo info, object o) { RelativeField f = info.Deserialize <RelativeField>("RelativeField"); if (o != null) { if (o is IChildrenObject) { IChildrenObject ch = o as IChildrenObject; if (ch.Children.Length != 0) { if (ch.Children.Length > 0) { ch.Children[0] = f; } } } } return(f); }
/// <summary> /// Deserialization ctor /// </summary> /// <param name="info">Serialization info</param> /// <param name="context">Streaming context</param> protected InertialSensorData(SerializationInfo info, StreamingContext context) : this() { relative = RelativeField.Load(info, this); post(); }