public static TaxiData GetTaxiData(TaxiNode from) { var to = new Dictionary<int, TaxiNode>(); foreach (var record in _taxiPath.Records) { var data = new TaxiPath(record); if (!data.IsValid || data.From != from.Id) continue; var nodeRecord = _taxiNodes.GetRecordById(data.To); if (nodeRecord == null) continue; to.Add(data.Id, new TaxiNode(nodeRecord)); } return new TaxiData(from, to); }
public static TaxiData GetTaxiData(TaxiNode from) { var to = new Dictionary <int, TaxiNode>(); foreach (var record in _taxiPath.Records) { var data = new TaxiPath(record); if (!data.IsValid || data.From != from.Id) { continue; } var nodeRecord = _taxiNodes.GetRecordById(data.To); if (nodeRecord == null) { continue; } to.Add(data.Id, new TaxiNode(nodeRecord)); } return(new TaxiData(from, to)); }