martedì 14 febbraio 2012 23:18
I've loaded a project via Workspace.LoadStandAloneProject and now I'd like to get ahold of the AssemblySymbol that represents the project. Is there a simple way to do this? Right now I have to use the ISemanticModel to resolve a syntax element in a SyntaxTree I get from an IDocument that I got from an IProject and then walk upto the AssemblySymbol.
Shouldn't IProject contain an ICompilation that can enumerate all the referenced AssemblySymbols -- both metadata and project reference -- and enumerate all the trees for each document?
Tutte le risposte
mercoledì 15 febbraio 2012 00:06Proprietario
You should be able to get to the AssemblySymbols, SyntaxTrees etc. as follows. (Of course you can also get to the MetadataReferences \ SyntaxTrees via the Compilation instead of using the IProject.)
Shyam Namboodiripad | Software Development Engineer in Test | Roslyn Compilers Team
- Contrassegnato come risposta kingces95 mercoledì 15 febbraio 2012 00:50
mercoledì 15 febbraio 2012 00:50Oh, duh. I keep not guessing if I have to use a "Get" prefix...
- Modificato kingces95 mercoledì 15 febbraio 2012 01:04