2021-05-13 20:03:07 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Model.Station
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Holds station info. </summary>
|
|
|
|
|
public class Station : IStation
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Constructs a station object.</summary>
|
|
|
|
|
/// <param name="p_iId">Id of the station.</param>
|
|
|
|
|
/// <param name="p_oGroup">Group (TINK, Konrad) to which station is related.</param>
|
|
|
|
|
/// <param name="p_oPosition">GPS- position of the station.</param>
|
|
|
|
|
/// <param name="p_strStationName">Name of the station.</param>
|
|
|
|
|
public Station(
|
2021-06-26 20:57:55 +02:00
|
|
|
|
string p_iId,
|
2021-05-13 20:03:07 +02:00
|
|
|
|
IEnumerable<string> p_oGroup,
|
|
|
|
|
Position p_oPosition,
|
|
|
|
|
string p_strStationName = "")
|
|
|
|
|
{
|
|
|
|
|
Id = p_iId;
|
|
|
|
|
Group = p_oGroup ?? throw new ArgumentException("Can not construct station object. Group of stations must not be null.");
|
|
|
|
|
Position = p_oPosition;
|
|
|
|
|
StationName = p_strStationName ?? string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the unique id of the station.c</summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
public string Id { get; }
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary> Holds the group to which the station belongs.</summary>
|
|
|
|
|
public IEnumerable<string> Group { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets the name of the station.</summary>
|
|
|
|
|
public string StationName { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the gps- position of the station.</summary>
|
|
|
|
|
public Position Position { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|