int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel) { if (QueryUnloadProject != null) { var project = pRealHierarchy.GetDteProject(); var eventArgs = new QueryUnloadProjectEventArgs { Project = project, Cancel = pfCancel == 1 }; QueryUnloadProject(project, eventArgs); pfCancel = eventArgs.Cancel ? 1 : 0; } return(VSConstants.S_OK); }
int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel) { if (QueryUnloadProject != null) { var project = pRealHierarchy.GetDteProject(); var eventArgs = new QueryUnloadProjectEventArgs { Project = project, Cancel = pfCancel == 1 }; QueryUnloadProject(project, eventArgs); pfCancel = eventArgs.Cancel ? 1 : 0; } return VSConstants.S_OK; }