sharee.bike-App/TINKLib/Model/Station/Station.cs
2021-06-26 20:57:55 +02:00

39 lines
1.4 KiB
C#

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(
string p_iId,
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>
public string Id { get; }
/// <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; }
}
}