Follesoe.VSMonoTouch.VSMonoTouchPackage.Initialize C# (CSharp) Method

Initialize() protected method

protected Initialize ( ) : void
return void
        protected override void Initialize()
        {
            RegisterProjectFactory(new MonoTouch26FlavorProjectFactory(this));
            RegisterProjectFactory(new MonoTouch28FlavorProjectFactory(this));

            _dte = GetService(typeof(SDTE)) as DTE;
            if (_dte == null) throw new Exception("DTE Reference Not Found");

            _buildEvents = _dte.Events.BuildEvents;
            _buildEvents.OnBuildBegin += MakeXibsNone;
            _buildEvents.OnBuildDone += MakeXibsPage;

            _solution = (IVsSolution)GetService(typeof(SVsSolution));
            if (_solution == null) throw new Exception("IVSSolution Reference Not Found.");
            _solution.AdviseSolutionEvents(_solutionEvents, out _solutionEventsCookie);

            base.Initialize();
        }