int IVsSolutionEvents.OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded) { ThreadHelper.ThrowIfNotOnUIThread(); if (OnAfterOpenProject != null) { SolutionItem?item = SolutionItem.FromHierarchy(pHierarchy, VSConstants.VSITEMID_ROOT) as Project; if (item is Project project) { OnAfterOpenProject?.Invoke(project); } #if VS14 else if (item is SolutionFolder folder && folder.FullPath != null) { OnAfterOpenFolder?.Invoke(folder.FullPath); } #endif } return(VSConstants.S_OK); }
void IVsSolutionEvents7.OnAfterOpenFolder(string folderPath) { OnAfterOpenFolder?.Invoke(folderPath); }