예제 #1
0
        public static IEnumerable <MethodDef> GetMethods(this TypeDef type, bool sortMembers)
        {
            if (!sortMembers || !type.CanSortMethods())
            {
                return(type.Methods);
            }
            var ary = type.Methods.ToArray();

            Array.Sort(ary, MethodDefComparer.Instance);
            return(ary);
        }