Reputation: 31
I need to search the referenced assemblies of the compilation under analysis for types that have the classname specified, irrespective of the namespace it is within.
Essentially I need a function that searches the referenced assemblies in the same way the below method searches the compilation under analysis.
context.SemanticModel.Compilation.GetSymbolsWithName(classNameToFind, SymbolFilter.Type);
Is there a way to load a compilation abstraction using the assembly name? I am ok with crude ways as long as I do not have to use reflection....so that I can continue to work with ISymbol.
Upvotes: 1
Views: 769
Reputation: 19021
I don't think we have a special API for this; you can just go to the Compilation's GlobalNamespace and manually walk the namespace/type hierarchy.
Upvotes: 1