public int OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel) { _logger?.LogEventMessage($"RealHierarchy: {Utils.GetName(pRealHierarchy)}"); var eventArgs = new ProjectUnloadQueryEventArgs(pRealHierarchy); QueryUnloadProject?.Invoke(this, eventArgs); if (eventArgs.Cancel) { pfCancel = 1; _logger?.LogEventMessage("Cancelled := True"); } return(VSConstants.S_OK); }
int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel) { QueryUnloadProject?.Invoke(this, EventArgs.Empty); return(VSConstants.S_OK); }