Beispiel #1
0
        public void it_should_notify_when_solution_created()
        {
            int created = VSConstants.S_OK;

            solutionEventSink.OnAfterOpenSolution(new Object(), created);

            solutionOpenedObserver.Messages.Should().HaveCount(1);
            solutionOpenedObserver.Messages.Single().Value.Value.Solution.Should().Be(someSolution);

            solutionClosingObserver.Messages.Should().BeEmpty();
            projectAddedObserver.Messages.Should().BeEmpty();
            projectRemovingObserver.Messages.Should().BeEmpty();
        }
        int IVsSolutionEvents.OnAfterOpenSolution(object pUnkReserved, int fNewSolution)
        {
            if (fNewSolution == 0)
            {
                isOpeningSolution = true;
            }

            IVsSolutionEvents hostService =
                (IVsSolutionEvents)GetService(typeof(IHostService));

            return(hostService.OnAfterOpenSolution(pUnkReserved, fNewSolution));
        }
Beispiel #3
0
        int IVsSolutionEvents.OnAfterOpenSolution(object pUnkReserved, int fNewSolution)
        {
            if (fNewSolution == 0)
            {
                isOpeningSolution = true;
            }

            //if (guidanceNavigatorManager == null)
            //{
            //    guidanceNavigatorManager = new GuidanceNavigatorManager(this as System.IServiceProvider);
            //}

            //IRecipeManagerService rms = (IRecipeManagerService)GetService(typeof(IRecipeManagerService));
            //rms.EnabledPackage += new PackageEventHandler(OnEnabledPackage);

            IVsSolutionEvents hostService =
                (IVsSolutionEvents)GetService(typeof(IHostService));
            int result = hostService.OnAfterOpenSolution(pUnkReserved, fNewSolution);

            //isOpeningSolution = false;
            return(result);
        }