Exemplo n.º 1
0
        public void LoadReflectionType(Type t)
        {
            var signature         = TypeSignature.FromType(t);
            var methods           = cx.GetMemberMethodDefs(signature).Where(m => m.Accessibility == Accessibility.APublic).Select(m => m.Name).Distinct().OrderBy(a => a).ToArray();
            var reflectionMethods = t.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)
                                    .Where(m => !m.IsSpecialName)
                                    .Select(m => m.Name).Distinct().OrderBy(a => a).ToArray();

            Assert.Equal(methods, reflectionMethods);
        }