public async Task <ImmutableArray <PackageWithTypeResult> > FindPackagesWithTypeAsync(
                string source, string name, int arity)
            {
                var results = await _session.TryInvokeAsync <ImmutableArray <PackageWithTypeResult> >(
                    nameof(IRemoteSymbolSearchUpdateEngine.FindPackagesWithTypeAsync),
                    source, name, arity).ConfigureAwait(false);

                return(results.NullToEmpty());
            }
            public async Task <ImmutableArray <PackageWithTypeResult> > FindPackagesWithTypeAsync(
                string source, string name, int arity, CancellationToken cancellationToken)
            {
                var results = await _session.TryInvokeAsync <IList <PackageWithTypeResult> >(
                    nameof(IRemoteSymbolSearchUpdateEngine.FindPackagesWithTypeAsync),
                    new object[] { source, name, arity }, cancellationToken).ConfigureAwait(false);

                return(results.ToImmutableArrayOrEmpty());
            }
            private void RegisterPrimarySolution()
            {
                this.AssertIsForeground();
                _currentSolutionId = _workspace.CurrentSolution.Id;
                var solutionId = _currentSolutionId;

                var storageLocation = _workspace.DeferredState?.ProjectTracker.GetWorkingFolderPath(_workspace.CurrentSolution);

                _session.TryInvokeAsync(
                    nameof(IRemoteHostService.RegisterPrimarySolutionId),
                    new object[] { solutionId, storageLocation }, CancellationToken.None).Wait(CancellationToken.None);
            }
Ejemplo n.º 4
0
            private void RegisterPrimarySolution()
            {
                this.AssertIsForeground();
                _currentSolutionId = _workspace.CurrentSolution.Id;
                var solutionId = _currentSolutionId;

                var storageLocation = _workspace.DeferredState?.ProjectTracker.GetWorkingFolderPath(_workspace.CurrentSolution);

                _currentRemoteWorkspaceNotificationTask = _currentRemoteWorkspaceNotificationTask.SafeContinueWithFromAsync(_ =>
                {
                    return(_session.TryInvokeAsync(
                               nameof(IRemoteHostService.RegisterPrimarySolutionId),
                               new object[] { solutionId, storageLocation }, CancellationToken.None));
                }, CancellationToken.None, TaskScheduler.Default);
            }