示例#1
0
        public IEnumerable <FlowKey> GetRoutes(AreaMap area)
        {
            var singleInstanceTypes = RouteTypes.ToHashSet();

            foreach (var typeIds in RouteIds)
            {
                var type = RouteTypes[typeIds.Type];

                singleInstanceTypes.Remove(type);

                var flow = area.GetFlow(type);

                foreach (var id in typeIds.Ids)
                {
                    yield return(FlowKey.From(flow, id));
                }
            }

            foreach (var type in singleInstanceTypes)
            {
                yield return(FlowKey.From(area.GetFlow(type)));
            }
        }