public async Task <SerializableNavigateToSearchResult[]> SearchProjectAsync(
            SerializableProjectId projectId, string searchPattern)
        {
            var solution = await GetSolutionAsync().ConfigureAwait(false);

            var project = solution.GetProject(projectId.Rehydrate());
            var result  = await AbstractNavigateToSearchService.SearchProjectInCurrentProcessAsync(
                project, searchPattern, CancellationToken).ConfigureAwait(false);

            return(Convert(result));
        }
        public async Task<SerializableNavigateToSearchResult[]> SearchProjectAsync(
             SerializableProjectId projectId, string searchPattern, byte[] solutionChecksum)
        {
            var solution = await GetSolutionAsync().ConfigureAwait(false);

            var project = solution.GetProject(projectId.Rehydrate());
            var result = await AbstractNavigateToSearchService.SearchProjectInCurrentProcessAsync(
                project, searchPattern, CancellationToken).ConfigureAwait(false);

            return Convert(result);
        }
Esempio n. 3
0
        public async Task <SymbolAndProjectId> RehydrateAsync(
            Solution solution, CancellationToken cancellationToken)
        {
            var projectId   = ProjectId.Rehydrate();
            var project     = solution.GetProject(projectId);
            var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);

            var symbol = SymbolKey.Resolve(SymbolKeyData, compilation, cancellationToken: cancellationToken).GetAnySymbol();

            Debug.Assert(symbol != null, "We should always be able to resolve a symbol back on the host side.");
            return(new SymbolAndProjectId(symbol, projectId));
        }
Esempio n. 4
0
 public DocumentId Rehydrate()
 {
     return(DocumentId.CreateFromSerialized(
                ProjectId.Rehydrate(), Id, DebugName));
 }