public override void PopulateFromLine(string line) { base.PopulateFromLine(line); //times ScheduledArrival = ScheduleTimeExtractor.GetTime(line, 10); PublicArrival = ScheduleTimeExtractor.GetTimeNoHalf(line, 15); Platform = line.Substring(19, 3).TrimEnd(); Path = line.Substring(22, 3).TrimEnd(); Activies = ActiviesCollection.CreateFromString(line.Substring(25, 12), ProgramState.PossibleActivities); }
public override void PopulateFromLine(string line) { base.PopulateFromLine(line); ScheduledDep = ScheduleTimeExtractor.GetTime(line, 10); PublicDep = ScheduleTimeExtractor.GetTimeNoHalf(line, 15); Platform = line.Substring(19, 3).Trim(); Line = line.Substring(22, 3).Trim(); Engineering = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 25); Pathing = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 27); Activies = ActiviesCollection.CreateFromString(line.Substring(29, 12), ProgramState.PossibleActivities); Performance = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 41); }
public override void PopulateFromLine(string line) { base.PopulateFromLine(line); //times ScheduledArrival = ScheduleTimeExtractor.GetTime(line, 10); ScheduledDep = ScheduleTimeExtractor.GetTime(line, 15); PassingTime = ScheduleTimeExtractor.GetTime(line, 20); PublicArrival = ScheduleTimeExtractor.GetTimeNoHalf(line, 25); PublicDep = ScheduleTimeExtractor.GetTimeNoHalf(line, 29); Platform = line.Substring(33, 3).TrimEnd(); Line = line.Substring(36, 3).TrimEnd(); Path = line.Substring(39, 3).TrimEnd(); Activies = ActiviesCollection.CreateFromString(line.Substring(42, 12), ProgramState.PossibleActivities); Engineering = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 54); Pathing = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 56); Performance = ScheduleTimeExtractor.TwoCharacterDigitTime(line, 58); }
public static ActiviesCollection CreateFromString(string source, Activity possibleActivities) { ActiviesCollection result = new ActiviesCollection(); int lastChar = source.Length - 2; for (int offset = 0; offset < lastChar; offset += 2) { string key = source.Substring(offset, 2).Trim(); if (!string.IsNullOrWhiteSpace(key)) { if (possibleActivities.Activities.ContainsKey(key)) { result.Add(key); } else { throw new ImportFileFormatException("Unkown", "Invalid Activities passed", 0, 0); } } } return(result); }
public ServiceNodeBase() { activies = new ActiviesCollection(); }