Пример #1
0
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            var dte = (DTE)GetService(typeof(SDTE));
            _packageRestorer = new PackageRestorer();
            _packageRestorer.Initialize(dte);
        }
Пример #2
0
        private void OnBeginShutDown()
        {
            _projectRetargetHandler.Dispose();
            _projectUpgradeHandler.Dispose();
            _packageRestorer.Dispose();
            _packageRestorer = null;

            _dteEvents.OnBeginShutdown -= OnBeginShutDown;
            _dteEvents = null;
        }
Пример #3
0
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            var dte = (DTE)GetService(typeof(SDTE));
            _dteEvents = dte.Events.DTEEvents;
            _dteEvents.OnBeginShutdown += OnBeginShutDown;

            _packageRestorer = new PackageRestorer(dte, this);
            _projectRetargetHandler = new ProjectRetargetingHandler(dte, this);
            _projectUpgradeHandler = new ProjectUpgradeHandler(this);
        }