public void it_should_notify_when_project_closing() { int removed = VSConstants.S_OK; solutionEventSink.OnBeforeCloseProject(someHierarchy, removed); solutionOpenedObserver.Messages.Should().BeEmpty(); solutionClosingObserver.Messages.Should().BeEmpty(); projectAddedObserver.Messages.Should().BeEmpty(); projectRemovingObserver.Messages.Should().HaveCount(1); projectRemovingObserver.Messages.Single().Value.Value.Hierarchy.Should().Be(someHierarchy); }
int IVsSolutionEvents.OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved) { IVsSolutionEvents hostService = (IVsSolutionEvents)GetService(typeof(IHostService)); return(hostService.OnBeforeCloseProject(pHierarchy, fRemoved)); }