protected virtual IEnumerable <IComposerContent> GetDecendentFunctions(IComposerContent content) { var functions = from area in content.ContentAreas from func in area.ContentFunctions select func; foreach (var f in functions) { yield return(f); // Call recursive to look for further nesting foreach (var decendent in GetDecendentFunctions(f)) { yield return(decendent); } } }
protected virtual IEnumerable<IComposerContent> GetDecendentFunctions(IComposerContent content) { var functions = from area in content.ContentAreas from func in area.ContentFunctions select func; foreach (var f in functions) { yield return f; // Call recursive to look for further nesting foreach (var decendent in GetDecendentFunctions(f)) { yield return decendent; } } }