private async Task OnSolutionExistsAndFullyLoadedAsync() { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); SolutionOpening?.Invoke(this, EventArgs.Empty); // although the SolutionOpened event fires, the solution may be only in memory (e.g. when // doing File - New File). In that case, we don't want to act on the event. if (!IsSolutionOpen) { return; } await EnsureNuGetAndVsProjectAdapterCacheAsync(); SolutionOpened?.Invoke(this, EventArgs.Empty); _solutionOpenedRaised = true; }
private void OnSolutionExistsAndFullyLoaded() { ThreadHelper.ThrowIfNotOnUIThread(); SolutionOpening?.Invoke(this, EventArgs.Empty); // although the SolutionOpened event fires, the solution may be only in memory (e.g. when // doing File - New File). In that case, we don't want to act on the event. if (!IsSolutionOpen) { return; } NuGetUIThreadHelper.JoinableTaskFactory.Run(() => EnsureNuGetAndVsProjectAdapterCacheAsync()); SolutionOpened?.Invoke(this, EventArgs.Empty); _solutionOpenedRaised = true; }