public MxfService getService(string stationId) { if (!_services.TryGetValue(stationId, out MxfService service)) { Services.Add(service = new MxfService() { index = Services.Count + 1, StationID = stationId }); ScheduleEntries.Add(service.mxfScheduleEntries); _services.Add(stationId, service); } return(service); }
public MxfService GetService(string stationId) { if (_services.TryGetValue(stationId, out var service)) { return(service); } With.Services.Add(service = new MxfService { Index = With.Services.Count + 1, StationId = stationId }); service.MxfScheduleEntries.Service = service.Id; With.ScheduleEntries.Add(service.MxfScheduleEntries); _services.Add(stationId, service); return(service); }