Exemplo n.º 1
0
        public BuildContext(IPackageContext packageContext, FindProjectItemDelegate findProjectItem)
        {
            _buildedProjects            = new BuildedProjectsCollection();
            _buildingProjects           = new List <ProjectItem>();
            _buildingProjectsLockObject = ((ICollection)_buildingProjects).SyncRoot;

            _packageContext  = packageContext;
            _findProjectItem = findProjectItem;

            Events dteEvents = packageContext.GetDTE().Events;

            _buildEvents   = dteEvents.BuildEvents;
            _windowEvents  = dteEvents.WindowEvents;
            _commandEvents = dteEvents.CommandEvents;

            _buildEvents.OnBuildBegin           += BuildEvents_OnBuildBegin;
            _buildEvents.OnBuildDone            += (s, e) => BuildEvents_OnBuildDone();
            _buildEvents.OnBuildProjConfigBegin += BuildEvents_OnBuildProjectBegin;
            _buildEvents.OnBuildProjConfigDone  += BuildEvents_OnBuildProjectDone;

            _windowEvents.WindowActivated += WindowEvents_WindowActivated;

            _commandEvents.AfterExecute += CommandEvents_AfterExecute;
        }
Exemplo n.º 2
0
        public BuildContext(IPackageContext packageContext, FindProjectItemDelegate findProjectItem)
        {
            _buildedProjects = new BuildedProjectsCollection();
            _buildingProjects = new List<ProjectItem>();
            _buildingProjectsLockObject = ((ICollection)_buildingProjects).SyncRoot;

            _packageContext = packageContext;
            _findProjectItem = findProjectItem;

            Events dteEvents = packageContext.GetDTE().Events;
            _buildEvents = dteEvents.BuildEvents;
            _windowEvents = dteEvents.WindowEvents;
            _commandEvents = dteEvents.CommandEvents;

            _buildEvents.OnBuildBegin += BuildEvents_OnBuildBegin;
            _buildEvents.OnBuildDone += (s, e) => BuildEvents_OnBuildDone();
            _buildEvents.OnBuildProjConfigBegin += BuildEvents_OnBuildProjectBegin;
            _buildEvents.OnBuildProjConfigDone += BuildEvents_OnBuildProjectDone;

            _windowEvents.WindowActivated += WindowEvents_WindowActivated;

            _commandEvents.AfterExecute += CommandEvents_AfterExecute;
        }