Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
        }