/// <summary> /// Initializes a new instance of the <see cref="Station"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="src">The source.</param> /// <exception cref="System.ArgumentNullException">owner or src</exception> public Station(SolarSystem owner, SerializableStation src) : base(src?.Agents?.Count ?? 0) { owner.ThrowIfNull(nameof(owner)); src.ThrowIfNull(nameof(src)); ID = src.ID; Name = src.Name; CorporationID = src.CorporationID; CorporationName = src.CorporationName; SolarSystem = owner; ReprocessingStationsTake = src.ReprocessingStationsTake; ReprocessingEfficiency = src.ReprocessingEfficiency; FullLocation = GetFullLocation(owner, src.Name); if (src.Agents == null) { return; } foreach (SerializableAgent agent in src.Agents) { Items.Add(new Agent(this, agent)); } }
/// <summary> /// Initializes a new instance of the <see cref="SolarSystem"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="src">The source.</param> /// <exception cref="System.ArgumentNullException">owner or src</exception> public Planet(SolarSystem owner, SerializablePlanet src) { owner.ThrowIfNull(nameof(owner)); src.ThrowIfNull(nameof(src)); SolarSystem = owner; ID = src.ID; Name = src.Name; TypeID = src.TypeID; }