我想获取类型的所有扩展方法。例如,对于类型string
,如果我使用semanticmodel方法lookupsymbols。
var sourceText = @"string a = "";
a."
var tree= CSharpSyntaxTree.ParseText(sourceTextx...);
....
var members = semanticModel.LookupSymbols(source.IndexOf("a."), someType, includeReducedExtensionMethods: true);
//this return all members with extension methods for type string someExtMethod(this string text)....
//I want get all extension with methods where first param might be one of them
var interfaces = someType.AllInerfaces;
//for example IEnumerable<out T>, methods like: Select, Where, Aggregate...