public IOrderedEnumerable <IMaybeNamed> GetAllDependents(ref IEnumerable <IMaybeNamed> toIgnore) { var res = IUnit.GetAllDependents(this, ref toIgnore).AsEnumerable(); var unitsComposedOfThis = IBaseUnit.GetAllIDerivedUnitsComposedOf(this); res = res.Union(unitsComposedOfThis); foreach (var unit in unitsComposedOfThis.Except(toIgnore)) { res = res.Union(unit.GetAllDependents(ref toIgnore)); } res.ThrowIfSetContains(this); return(res.SortByTypeAndName()); }