Exemplo n.º 1
0
            private async Task FindNugetTypeReferencesAsync(
                PackageSource source,
                ISymbolSearchService searchService,
                IPackageInstallerService installerService,
                List <Reference> allReferences,
                TSimpleNameSyntax nameNode,
                string name,
                int arity,
                bool isAttributeSearch,
                CancellationToken cancellationToken)
            {
                cancellationToken.ThrowIfCancellationRequested();
                var results = await searchService.FindPackagesWithTypeAsync(
                    source.Name, name, arity, cancellationToken).ConfigureAwait(false);

                if (results.IsDefault)
                {
                    return;
                }

                var project   = _document.Project;
                var projectId = project.Id;
                var workspace = project.Solution.Workspace;

                foreach (var result in results)
                {
                    cancellationToken.ThrowIfCancellationRequested();
                    await HandleNugetReferenceAsync(
                        source.Source, installerService, allReferences, nameNode,
                        project, isAttributeSearch, result, weight : allReferences.Count).ConfigureAwait(false);
                }
            }
Exemplo n.º 2
0
            public async Task <ImmutableArray <PackageWithTypeResult> > FindPackagesWithTypeAsync(
                string source, string name, int arity)
            {
                var result = await _symbolSearchService.FindPackagesWithTypeAsync(
                    source, name, arity, _cancellationToken).ConfigureAwait(false);

                return(result);
            }
Exemplo n.º 3
0
 public Task <IList <PackageWithTypeResult> > FindPackagesWithTypeAsync(
     string source, string name, int arity, CancellationToken cancellationToken)
 {
     return(_symbolSearchService.FindPackagesWithTypeAsync(
                source, name, arity, cancellationToken));
 }
Exemplo n.º 4
0
 public Task <ImmutableArray <PackageWithTypeResult> > FindPackagesWithTypeAsync(
     string source, string name, int arity)
 {
     return(_symbolSearchService.FindPackagesWithTypeAsync(
                source, name, arity, _cancellationToken));
 }