private static IEnumerable <SccProject> GetSelection(ISelectionContext iSelectionContext) { bool foundOne = false; foreach (SccProject pr in iSelectionContext.GetSelectedProjects(true)) { yield return(pr); foundOne = true; } if (foundOne) { yield break; } foreach (SccProject pr in iSelectionContext.GetOwnerProjects()) { yield return(pr); } }
private static IEnumerable<SvnProject> GetSelection(ISelectionContext iSelectionContext) { bool foundOne = false; foreach (SvnProject pr in iSelectionContext.GetSelectedProjects(true)) { yield return pr; foundOne = true; } if (foundOne) yield break; foreach (SvnProject pr in iSelectionContext.GetOwnerProjects()) { yield return pr; } }