namespace Web12306.Servers.TrainSuggestion { using System; using Newtonsoft.Json; public class Elapsedtime { public string days { get; set; } public string total { get; set; } TimeSpan? _elTimeSpan; [JsonIgnore] public TimeSpan Value { get { if (_elTimeSpan == null) { _elTimeSpan = Cn12306SuggestionUtility.GetTimeValueSpan(total); } return _elTimeSpan.Value; } } TimeSpan? _maxAddTime; /// /// 最大允许加时 /// [JsonIgnore] public TimeSpan MaxAddTime { get { if (_maxAddTime == null) { _maxAddTime = new TimeSpan(0, 0, 0, (int)(Value.TotalSeconds * Cn12306SuggestionUtility.TimeRangeLimitRadio)); } return _maxAddTime.Value; } } } }