/// <summary> /// Constructor from an object deserialized from the settings file. /// </summary> /// <param name="src">The source.</param> /// <exception cref="System.ArgumentNullException">src</exception> protected MarketOrder(SerializableOrderBase src) { src.ThrowIfNull(nameof(src)); ID = src.OrderID; UnitaryPrice = src.UnitaryPrice; RemainingVolume = src.RemainingVolume; Issued = src.Issued; IssuedFor = src.IssuedFor == IssuedFor.None ? IssuedFor.Character : src.IssuedFor; LastStateChange = src.LastStateChange; m_state = src.State; }
/// <summary> /// Fetches the data to the given source. /// </summary> /// <param name="src"></param> protected SerializableOrderBase Export(SerializableOrderBase src) { src.ThrowIfNull(nameof(src)); src.OrderID = ID; src.State = m_state; src.UnitaryPrice = UnitaryPrice; src.RemainingVolume = RemainingVolume; src.Issued = Issued; src.IssuedFor = IssuedFor; src.LastStateChange = LastStateChange; return(src); }