コード例 #1
0
ファイル: AddToSccCommands.cs プロジェクト: windygu/AnkhSVN
        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);
            }
        }
コード例 #2
0
ファイル: AddToSccCommands.cs プロジェクト: necora/ank_git
        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;
            }
        }