예제 #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);
        }
예제 #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));
        }