private void AddPlatform(locationDetail detail, string p) { var foos = new List<string>(detail.platformCode); if (!foos.Contains(p)) { foos.Add(p); foos.Sort(); detail.platformCode = foos.ToArray(); } }
private locationDetail GetOrCreateLocationDetail(string name) { locationDetail detail = GetLocationDetail(name); if (detail == null) { detail = new locationDetail(); detail.lineCode = new string[0]; detail.pathCode = new string[0]; detail.platformCode = new string[0]; detail.locationID = name; var foos = new List<locationDetail>(Locations.locationDetail); foos.Add(detail); Locations.locationDetail = foos.ToArray(); } return detail; }