コード例 #1
0
        public static void Main()
        {
            GetMethod_Name.TestName();
            GetMethod_Name.TestNamePrivate();
            GetMethod_Name_Types.TestNameAndType();
            GetMethod_Name_BindingAttr.TestExplicitBindingFlags();
            GetMethod_Name_BindingAttr.TestUnknownBindingFlags(BindingFlags.Public);
            GetMethod_Name_BindingAttr.TestUnknownBindingFlagsAndName(BindingFlags.Public, "DoesntMatter");
            GetMethod_Name_BindingAttr.TestUnknownNullBindingFlags(BindingFlags.Public);
            GetMethod_Name_BindingAttr_Binder_Types_Modifiers.TestNameBindingFlagsAndParameterModifier();
            GetMethod_Name_BindingAttr_Binder_CallConvention_Types_Modifiers.TestNameBindingFlagsCallingConventionParameterModifier();
#if NETCOREAPP
            GetMethod_Name_BindingAttr_Types.TestNameBindingFlagsAndTypes();
            GetMethod_Name_GenericParameterCount_Types.TestNameWithIntAndType();
            GetMethod_Name_GenericParameterCount_Types_Modifiers.TestNameWithIntAndTypeAndModifiers();
            GetMethod_Name_GenericParameterCount_BindingAttr_Binder_Types_Modifiers.TestNameWithIntAndBindingFlags();
            GetMethod_Name_GenericParameterCount_BindingAttr_Binder_Types_Modifiers_PrivateBinding.TestNameWithIntAndPrivateBindingFlags();
            GetMethod_Name_GenericParameterCount_BindingAttr_Binder_CallConvention_Types_Modifiers.TestNameWithIntBindingFlagsCallingConventionParameter();
#endif
            TestNullName();
            TestEmptyName();
            TestNonExistingName();
            TestNullType();
            TestDataFlowType();
            IfElse.TestIfElse(1);
            DerivedAndBase.TestMethodInBaseType();
            IgnoreCaseBindingFlags.TestIgnoreCaseBindingFlags();
            FailIgnoreCaseBindingFlags.TestFailIgnoreCaseBindingFlags();
            IgnorableBindingFlags.TestIgnorableBindingFlags();
            UnsupportedBindingFlags.TestUnsupportedBindingFlags();
        }
コード例 #2
0
        public static void Main()
        {
            ByName.Test();
            PrivateByName.Test();
            NullName.Test();
            EmptyName.Test();
            NoValueName.Test();
            WithBindingFlags.Test();
            UnknownBindingFlags.Test(BindingFlags.Public);
            UnknownBindingFlagsAndName.Test(BindingFlags.Public, "DoesntMatter");
            NonExistingName.Test();
            TestNullType();
            TestNoValue();
            IgnoreCaseBindingFlags.Test();
            FailIgnoreCaseBindingFlags.Test();
            UnsupportedBindingFlags.Test();

            MemberOnNestedType.Test();
        }