Light12306/Web12306/Servers/TrainSuggestion/StopInfo.cs

55 lines
1.3 KiB
C#
Raw Normal View History

2015-03-13 19:25:08 +08:00
namespace Web12306.Servers.TrainSuggestion
{
using System;
public class StopInfo
{
public string start_station_name { get; set; }
public string arrive_time { get; set; }
public string station_train_code { get; set; }
public string station_name { get; set; }
public string train_class_name { get; set; }
public string service_type { get; set; }
public string start_time { get; set; }
public string stopover_time { get; set; }
public string end_station_name { get; set; }
public string station_no { get; set; }
public bool isEnabled { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/// </summary>
public DateTime ArriveTime { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/// </summary>
public DateTime StartTime { get; set; }
TimeSpan? _stopTimeSpan;
public TimeSpan StopTime
{
get
{
if (!_stopTimeSpan.HasValue)
{
_stopTimeSpan = Cn12306SuggestionUtility.GetStopTimeSpan(stopover_time);
}
return _stopTimeSpan.Value;
}
}
TimeSpan? _arriveTime, _startTime;
public TimeSpan ArriveTimePoint
{
get { return (_arriveTime ?? (_arriveTime = Cn12306SuggestionUtility.GetTimeValueSpan(arrive_time))).Value; }
}
public TimeSpan StartTimePoint
{
get { return (_startTime ?? (_startTime = Cn12306SuggestionUtility.GetTimeValueSpan(start_time))).Value; }
}
}
}