Ejemplo n.º 1
0
        private static bool VisitList <TElementType>(ListElementHandler <TElementType> handler, IList <TElementType> list)
        {
            bool flag = false;

            foreach (TElementType local in list)
            {
                bool flag2 = handler(local);
                flag = flag || flag2;
            }
            return(flag);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Helper method for iterating a list
        /// </summary>
        /// <typeparam name="TElementType"></typeparam>
        /// <param name="handler"></param>
        /// <param name="list"></param>
        /// <returns></returns>
        private static bool VisitList <TElementType>(ListElementHandler <TElementType> handler, IList <TElementType> list)
        {
            bool result = false;

            foreach (TElementType element in list)
            {
                bool localResult = handler(element);
                result = result || localResult;
            }
            return(result);
        }