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);
        }
예제 #2
0
 int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel)
 {
     QueryUnloadProject?.Invoke(this, EventArgs.Empty);
     return(VSConstants.S_OK);
 }