private static IEnumerable <T> GetAllInclusions <T>(this IInclusive <T> me, List <T> progress) { var res = progress; if (me.Inclusions == null) { return(res); } var fs = me.Inclusions.Except(res).ToList(); res.AddRange(fs); foreach (var f in fs) { GetAllInclusions((IInclusive <T>)f, res); } return(res); }
public static IEnumerable <T> GetAllInclusions <T>(this IInclusive <T> me) => GetAllInclusions(me, new List <T>(new T[] { }));
public static IEnumerable <T> GetAllInclusions <T>(this IInclusive <T> me) { //return GetAllInclusions(me, new List<T>(new[] { (T)me })); return(GetAllInclusions(me, new List <T>(new T[] { }))); }