public static void Initialize(Package serviceProvider, DTE2 dte, Options options) { ThreadHelper.ThrowIfNotOnUIThread(); Instance = new CloseOpenDocuments(serviceProvider, dte, options); Microsoft.VisualStudio.Shell.Events.SolutionEvents.OnBeforeCloseSolution += (s, e) => Instance.Execute(); }
protected override void Initialize() { var dte = GetService(typeof(DTE)) as DTE2; var options = (Options)GetDialogPage(typeof(Options)); CloseOpenDocuments.Initialize(this, dte, options); CollapseFolders.Initialize(dte, options); SolutionExplorerFocus.Initialize(dte, options); DeleteBinFolder.Initialize(dte, options); DeleteTestResultsFolder.Initialize(dte, options); DeleteDotVsFolder.Initialize(dte, options); }
protected override async task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await JoinableTaskFactory.SwitchToMainThreadAsync(); var dte = await GetServiceAsync(typeof(DTE)) as DTE2; var options = (Options)GetDialogPage(typeof(Options)); CloseOpenDocuments.Initialize(this, dte, options); CollapseFolders.Initialize(dte, options); SolutionExplorerFocus.Initialize(dte, options); DeleteBinFolder.Initialize(dte, options); DeleteTestResultsFolder.Initialize(dte, options); DeleteDotVsFolder.Initialize(dte, options); DeleteIISExpressLogsFolder.Initialize(dte, options); DeleteIISExpressTraceLogFilesFolder.Initialize(dte, options); }
public static void Initialize(IServiceProvider serviceProvider, DTE2 dte, Options options) { Instance = new CloseOpenDocuments(serviceProvider, dte, options); }