Ejemplo n.º 1
0
        protected override void Initialize()
        {
            base.Initialize();

            DTE dte = GetGlobalService(typeof(DTE)) as DTE;
            if (dte == null)
                return;

            uint solutionEventsCookie;
            IVsSolutionEvents vsSolutionEvents = new VsSolutionEvents();
            IVsSolution vsSolution = (IVsSolution)ServiceProvider.GlobalProvider.GetService(typeof(SVsSolution));
            vsSolution.AdviseSolutionEvents(vsSolutionEvents, out solutionEventsCookie);
        }
Ejemplo n.º 2
0
        protected override void Initialize()
        {
            base.Initialize();

            DTE dte = GetGlobalService(typeof(DTE)) as DTE;

            if (dte == null)
            {
                return;
            }

            uint solutionEventsCookie;
            IVsSolutionEvents vsSolutionEvents = new VsSolutionEvents();
            IVsSolution       vsSolution       = (IVsSolution)ServiceProvider.GlobalProvider.GetService(typeof(SVsSolution));

            vsSolution.AdviseSolutionEvents(vsSolutionEvents, out solutionEventsCookie);
        }