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); }
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); }