public OutputConsoleLogger( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IOutputConsoleProvider consoleProvider, Lazy <ErrorListTableDataSource> errorListDataSource) { if (serviceProvider == null) { throw new ArgumentNullException(nameof(serviceProvider)); } if (consoleProvider == null) { throw new ArgumentNullException(nameof(consoleProvider)); } ErrorListTableDataSource = errorListDataSource; NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _dte = serviceProvider.GetDTE(); OutputConsole = consoleProvider.CreatePackageManagerConsole(); }); }
public OutputConsoleLogger( IAsyncServiceProvider asyncServiceProvider, IOutputConsoleProvider consoleProvider, Lazy <ErrorListTableDataSource> errorListDataSource) { if (asyncServiceProvider == null) { throw new ArgumentNullException(nameof(asyncServiceProvider)); } if (consoleProvider == null) { throw new ArgumentNullException(nameof(consoleProvider)); } ErrorListTableDataSource = errorListDataSource; NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _dte = await asyncServiceProvider.GetDTEAsync(); _buildEvents = _dte.Events.BuildEvents; _buildEvents.OnBuildBegin += (_, __) => { ErrorListTableDataSource.Value.ClearNuGetEntries(); }; _solutionEvents = _dte.Events.SolutionEvents; _solutionEvents.AfterClosing += () => { ErrorListTableDataSource.Value.ClearNuGetEntries(); }; OutputConsole = consoleProvider.CreatePackageManagerConsole(); }); }
public OutputConsoleLogger( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IOutputConsoleProvider consoleProvider) { if (serviceProvider == null) { throw new ArgumentNullException(nameof(serviceProvider)); } if (consoleProvider == null) { throw new ArgumentNullException(nameof(consoleProvider)); } NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); ErrorListProvider = new ErrorListProvider(serviceProvider); _dte = serviceProvider.GetDTE(); _buildEvents = _dte.Events.BuildEvents; _buildEvents.OnBuildBegin += (_, __) => { ErrorListProvider.Tasks.Clear(); }; _solutionEvents = _dte.Events.SolutionEvents; _solutionEvents.AfterClosing += () => { ErrorListProvider.Tasks.Clear(); }; OutputConsole = consoleProvider.CreatePackageManagerConsole(); }); }
internal virtual void ShowWarningMessage(string message) { var console = _consoleProvider.CreatePackageManagerConsole(); console.WriteLine(message); }
internal virtual void ShowWarningMessage(string message) { var console = _consoleProvider.CreatePackageManagerConsole(); NuGetUIThreadHelper.JoinableTaskFactory.Run(() => console.WriteLineAsync(message)); }