Ejemplo n.º 1
0
            public SymbolReferenceFinder(
                AbstractAddImportFeatureService <TSimpleNameSyntax> owner,
                Document document, SemanticModel semanticModel,
                string diagnosticId, SyntaxNode node,
                ISymbolSearchService symbolSearchService,
                bool searchReferenceAssemblies,
                ImmutableArray <PackageSource> packageSources,
                CancellationToken cancellationToken)
            {
                _owner         = owner;
                _document      = document;
                _semanticModel = semanticModel;
                _diagnosticId  = diagnosticId;
                _node          = node;

                _symbolSearchService       = symbolSearchService;
                _searchReferenceAssemblies = searchReferenceAssemblies;
                _packageSources            = packageSources;

                if (_searchReferenceAssemblies || packageSources.Length > 0)
                {
                    Contract.ThrowIfNull(symbolSearchService);
                }

                _syntaxFacts = document.GetLanguageService <ISyntaxFactsService>();

                _namespacesInScope = GetNamespacesInScope(cancellationToken);
            }
Ejemplo n.º 2
0
 public SymbolReference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SymbolResult <INamespaceOrTypeSymbol> symbolResult)
     : base(provider, new SearchResult(symbolResult))
 {
     SymbolResult = symbolResult;
 }
Ejemplo n.º 3
0
 protected Reference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SearchResult searchResult)
 {
     this.provider = provider;
     SearchResult  = searchResult;
 }
Ejemplo n.º 4
0
 public AssemblyReference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SearchResult searchResult,
     ReferenceAssemblyWithTypeResult referenceAssemblyWithType)
     : base(provider, searchResult)
 {
     _referenceAssemblyWithType = referenceAssemblyWithType;
 }
 public ProjectSymbolReference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SymbolResult <INamespaceOrTypeSymbol> symbolResult,
     Project project)
     : base(provider, symbolResult)
 {
     _project = project;
 }
Ejemplo n.º 6
0
 public AllSymbolsProjectSearchScope(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     Project project,
     bool exact,
     CancellationToken cancellationToken)
     : base(provider, project, exact, cancellationToken)
 {
 }
Ejemplo n.º 7
0
 public SourceSymbolsProjectSearchScope(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     ConcurrentDictionary <Project, AsyncLazy <IAssemblySymbol> > projectToAssembly,
     Project project, bool ignoreCase, CancellationToken cancellationToken)
     : base(provider, project, ignoreCase, cancellationToken)
 {
     _projectToAssembly = projectToAssembly;
 }
 public MetadataSymbolReference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SymbolResult <INamespaceOrTypeSymbol> symbolResult,
     ProjectId referenceProjectId,
     PortableExecutableReference reference)
     : base(provider, symbolResult)
 {
     _referenceProjectId = referenceProjectId;
     _reference          = reference;
 }
Ejemplo n.º 9
0
 protected SearchScope(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     bool exact,
     CancellationToken cancellationToken
     )
 {
     this.provider     = provider;
     Exact             = exact;
     CancellationToken = cancellationToken;
 }
Ejemplo n.º 10
0
 public PackageReference(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     SearchResult searchResult,
     string source,
     string packageName,
     string versionOpt)
     : base(provider, searchResult)
 {
     _source      = source;
     _packageName = packageName;
     _versionOpt  = versionOpt;
 }
Ejemplo n.º 11
0
 public MetadataSymbolsSearchScope(
     AbstractAddImportFeatureService <TSimpleNameSyntax> provider,
     Solution solution,
     IAssemblySymbol assembly,
     ProjectId assemblyProjectId,
     PortableExecutableReference metadataReference,
     bool exact,
     CancellationToken cancellationToken)
     : base(provider, exact, cancellationToken)
 {
     _solution          = solution;
     _assembly          = assembly;
     _assemblyProjectId = assemblyProjectId;
     _metadataReference = metadataReference;
 }
Ejemplo n.º 12
0
            public SymbolReferenceFinder(
                AbstractAddImportFeatureService <TSimpleNameSyntax> owner,
                Document document,
                SemanticModel semanticModel,
                string diagnosticId,
                SyntaxNode node,
                ISymbolSearchService symbolSearchService,
                AddImportOptions options,
                ImmutableArray <PackageSource> packageSources,
                CancellationToken cancellationToken)
            {
                _owner         = owner;
                _document      = document;
                _semanticModel = semanticModel;
                _diagnosticId  = diagnosticId;
                _node          = node;

                _symbolSearchService = symbolSearchService;
                _options             = options;
                _packageSources      = packageSources;
                _syntaxFacts         = document.GetLanguageService <ISyntaxFactsService>();

                _namespacesInScope = GetNamespacesInScope(cancellationToken);
            }