Get exported semantic model for MetadataReference

Can I get the ITypeSymbol collection for types exported by the assembly that was added to the compilation as metadata?

I want to check the types available for a link project.

+4
source share
1 answer

Call Compilation.GetAssemblyOrModuleSymbol()for each MetadataReference by clicking on IAssemblySymbol, then look at the property TypeNames(which returns the rows).

ITypeSymbol , GlobalNamespace, GetMembers() ( ). SymbolVisitor<IEnumerable<ITypeSymbol>>, ( ).

+4

Source: https://habr.com/ru/post/1610029/


All Articles