QtSilentInstall.Accessible.Descend C# (CSharp) 메소드

Descend() 개인적인 정적인 메소드

private static Descend ( ICollection c, Predicate match ) : Accessible
c ICollection
match Predicate
리턴 Accessible
        private static Accessible Descend(ICollection<Accessible> c, Predicate<Accessible> match)
        {
            foreach (Accessible a in c)
            {
                if (match(a))
                    return a;

                if (a.hasChildren)
                {
                    Accessible r = Descend(a.Children, match);
                    if (r != null)
                        return r;
                }
            }
            return null;
        }