コード例 #1
0
 private async Task <IList <TodoComment> > GetTodoCommentsInRemoteHostAsync(
     RemoteHostClient client, Document document, ImmutableArray <TodoCommentDescriptor> commentDescriptors, CancellationToken cancellationToken)
 {
     return(await client.RunCodeAnalysisServiceOnRemoteHostAsync <IList <TodoComment> >(
                document.Project.Solution, nameof(IRemoteTodoCommentService.GetTodoCommentsAsync),
                new object[] { document.Id, commentDescriptors }, cancellationToken).ConfigureAwait(false));
 }
コード例 #2
0
        private async Task <ImmutableArray <INavigateToSearchResult> > SearchProjectInRemoteProcessAsync(
            RemoteHostClient client, Project project, string searchPattern, CancellationToken cancellationToken)
        {
            var solution = project.Solution;

            var serializableResults = await client.RunCodeAnalysisServiceOnRemoteHostAsync <SerializableNavigateToSearchResult[]>(
                solution, nameof(IRemoteNavigateToSearchService.SearchProjectAsync),
                new object[] { project.Id, searchPattern }, cancellationToken).ConfigureAwait(false);

            serializableResults = serializableResults ?? Array.Empty <SerializableNavigateToSearchResult>();
            return(serializableResults.Select(r => r.Rehydrate(solution)).ToImmutableArray());
        }
コード例 #3
0
 private async Task <DesignerAttributeResult> ScanDesignerAttributesInRemoteHostAsync(RemoteHostClient client, Document document, CancellationToken cancellationToken)
 {
     return(await client.RunCodeAnalysisServiceOnRemoteHostAsync <DesignerAttributeResult>(
                document.Project.Solution, nameof(IRemoteDesignerAttributeService.ScanDesignerAttributesAsync),
                document.Id, cancellationToken).ConfigureAwait(false));
 }