コード例 #1
0
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            _dte    = GetService(typeof(DTE)) as DTE2;
            Package = this;

            Logger.Initialize(this, Constants.VSIX_NAME);

            Events2 events = (Events2)_dte.Events;

            _solutionEvents = events.SolutionEvents;
            _solutionEvents.AfterClosing   += () => { TableDataSource.Instance.CleanAllErrors(); };
            _solutionEvents.ProjectRemoved += (project) => { TableDataSource.Instance.CleanAllErrors(); };

            _buildEvents = events.BuildEvents;
            _buildEvents.OnBuildBegin += OnBuildBegin;

            CreateConfig.Initialize(this);
            Recompile.Initialize(this);
            CompileOnBuild.Initialize(this);
            RemoveConfig.Initialize(this);
            CompileAllFiles.Initialize(this);
            CleanOutputFiles.Initialize(this);
        }
コード例 #2
0
        protected override void Initialize()
        {
            _dte    = GetService(typeof(DTE)) as DTE2;
            Package = this;

            Logger.Initialize(this, Constants.VSIX_NAME);

            Events2 events = (Events2)_dte.Events;

            _solutionEvents = events.SolutionEvents;
            _solutionEvents.AfterClosing   += () => { TableDataSource.Instance.CleanAllErrors(); };
            _solutionEvents.ProjectRemoved += (project) => { TableDataSource.Instance.CleanAllErrors(); };

            _buildEvents = events.BuildEvents;
            _buildEvents.OnBuildBegin += OnBuildBegin;

            CreateConfig.Initialize(this);
            Recompile.Initialize(this);
            CompileOnBuild.Initialize(this);
            RemoveConfig.Initialize(this);
            CompileAllFiles.Initialize(this);
            CleanOutputFiles.Initialize(this);

            base.Initialize();
        }
コード例 #3
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Constants.VSIX_NAME);

            _dte        = GetService(typeof(DTE)) as DTE2;
            _dispatcher = Dispatcher.CurrentDispatcher;
            Package     = this;

            Events2 events = _dte.Events as Events2;

            _events = events.SolutionEvents;
            _events.AfterClosing   += () => { ErrorList.CleanAllErrors(); };
            _events.ProjectRemoved += (project) => { ErrorList.CleanAllErrors(); };

            CreateConfig.Initialize(this);
            Recompile.Initialize(this);
            CompileOnBuild.Initialize(this);
            RemoveConfig.Initialize(this);
            CompileAllFiles.Initialize(this);

            base.Initialize();
        }