Beispiel #1
0
 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;
 }
Beispiel #2
0
        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();
        }