IgnoreSolution() публичный статический Метод

public static IgnoreSolution ( bool ignore ) : void
ignore bool
Результат void
        public async Task ShowDialog(ExtensionFileModel model)
        {
            var extensions = model.Extensions.SelectMany(e => e.Value);

            InstallerDialog dialog = new InstallerDialog(extensions);

            dialog.Title = "Solution specific extensions";
            dialog.NeverShowAgainForSolution = Settings.IsSolutionIgnored();

            var dte  = _serviceProvider.GetService(typeof(DTE)) as DTE2;
            var hwnd = new IntPtr(dte.MainWindow.HWnd);

            System.Windows.Window window = (System.Windows.Window)HwndSource.FromHwnd(hwnd).RootVisual;
            dialog.Owner = window;

            var result = dialog.ShowDialog();

            Settings.IgnoreSolution(dialog.NeverShowAgainForSolution);

            if (!result.HasValue || !result.Value)
            {
                return;
            }

            ExtensionInstaller installer = new ExtensionInstaller(_serviceProvider, _repository, _manager);
            await installer.InstallExtensions(dialog.SelectedExtensions);
        }
Пример #2
0
        public async Task ShowDialog(ExtensionFileModel model)
        {
            var extensions = model.Extensions.SelectMany(e => e.Value);

            InstallerDialog dialog = new InstallerDialog(extensions);

            dialog.Title = "Solution specific extensions";
            dialog.NeverShowAgainForSolution = Settings.IsSolutionIgnored();

            var result = dialog.ShowDialog();

            Settings.IgnoreSolution(dialog.NeverShowAgainForSolution);

            if (!result.HasValue || !result.Value)
            {
                return;
            }

            ExtensionInstaller installer = new ExtensionInstaller(_repository, _manager);
            await installer.InstallExtensions(dialog.SelectedExtensions);
        }