public static IEnumerable <ISymbol> Members(this ITypeSymbol symbol, bool recursive = false) { var members = symbol.GetMembers(); if (recursive) { return(members.Concat(symbol.Bases().SelectMany(@base => @base.Members()))); } else { return(members); } }