Exemplo n.º 1
0
        protected override void Initialize()
        {
            _logger           = new FileLogger(Path.GetTempPath(), autoFlush: true);
            _solutionMonitor  = new VsSolutionMonitor(this, _logger);
            _uiContextMonitor = new UiContextMonitor(_logger);

            _uiContextMonitor.AddContext(KnownUIContexts.NoSolutionContext, "NoSolution");
            _uiContextMonitor.AddContext(KnownUIContexts.SolutionOpeningContext, "SolutionOpening");
            _uiContextMonitor.AddContext(KnownUIContexts.SolutionExistsContext, "SolutionExists");
            _uiContextMonitor.AddContext(KnownUIContexts.SolutionExistsAndFullyLoadedContext, "SolutionExistsAndFullyLoaded");
            _uiContextMonitor.AddContext(KnownUIContexts.SolutionExistsAndNotBuildingAndNotDebuggingContext, "SolutionExistsAndNotBuildingAndNotDebugging");
            _uiContextMonitor.AddContext(KnownUIContexts.SolutionBuildingContext, "SolutionBuilding");
        }
Exemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _uiContextMonitor?.Dispose();
                _uiContextMonitor = null;

                _solutionMonitor?.Dispose();
                _solutionMonitor = null;

                _logger?.Dispose();
                _logger = null;
            }

            base.Dispose(disposing);
        }