Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public static void Initialize(IServiceProvider serviceProvider, DTE2 dte, Options options)
 {
     Instance = new CloseOpenDocuments(serviceProvider, dte, options);
 }