예제 #1
0
        public static IEnumerable <Type> AllInterfaces(this Type target)
        {
            foreach (var IF in target.GetInterfaces())
            {
                yield return(IF);

                foreach (var childIF in IF.AllInterfaces())
                {
                    yield return(childIF);
                }
            }
        }
예제 #2
0
        public static IEnumerable <Type> AllInterfaces(this Type target)
        {
            Type[] interfaces = target.GetInterfaces();
            foreach (Type IF in interfaces)
            {
                yield return(IF);

                foreach (Type item in IF.AllInterfaces())
                {
                    yield return(item);
                }
            }
        }