private VsEvents(IVsEventsHandler eventsHandler, IVsSolution solution) { this.eventsHandler = eventsHandler; this.solution = solution; this.solution.AdviseSolutionEvents(this, out solutionEventsCookie); this.dte = Package.GetGlobalService(typeof(DTE)) as DTE; }
public static void Initialize(IVsEventsHandler eventsHandler, IVsSolution solution) { if (eventsHandler == null) { throw new ArgumentNullException("eventsHandler"); } if (solution == null) { throw new ArgumentNullException("solution"); } VsEvents.instance = new VsEvents(eventsHandler, solution); instance.addBuildListners(); }