Exemplo n.º 1
0
 public bool ContainsAssemblyOrModuleOrDynamic(ISymbol symbol, bool primary)
 {
     if (_compilationWithReplacement == null)
     {
         // We don't have a compilation yet, so this couldn't have came from us
         return(false);
     }
     else
     {
         return(UnrootedSymbolSet.Create(_compilationWithReplacement).ContainsAssemblyOrModuleOrDynamic(symbol, primary));
     }
 }
Exemplo n.º 2
0
                /// <param name="finalCompilation">Not held onto</param>
                /// <param name="projectId">Not held onto</param>
                /// <param name="metadataReferenceToProjectId">Not held onto</param>
                public static FinalState Create(
                    Compilation finalCompilationSource,
                    Compilation compilationWithoutGeneratedFiles,
                    bool hasSuccessfullyLoaded,
                    CompilationTrackerGeneratorInfo generatorInfo,
                    Compilation finalCompilation,
                    ProjectId projectId,
                    Dictionary <MetadataReference, ProjectId>?metadataReferenceToProjectId)
                {
                    // Keep track of information about symbols from this Compilation.  This will help support other APIs
                    // the solution exposes that allows the user to map back from symbols to project information.

                    var unrootedSymbolSet = UnrootedSymbolSet.Create(finalCompilation);

                    RecordAssemblySymbols(projectId, finalCompilation, metadataReferenceToProjectId);

                    return(new FinalState(
                               finalCompilationSource,
                               compilationWithoutGeneratedFiles,
                               hasSuccessfullyLoaded,
                               generatorInfo,
                               unrootedSymbolSet));
                }