Пример #1
0
        public static void Main()
        {
            TestRequiresOnlyThroughReflection();
            AccessedThroughReflectionOnGenericType <TestType> .Test();

            AccessThroughSpecialAttribute.Test();
            AccessThroughPInvoke.Test();
            AccessThroughNewConstraint.Test <TestType> ();
            AccessThroughNewConstraint.TestNewConstraintOnTypeParameter <TestType> ();
            AccessThroughNewConstraint.TestNewConstraintOnTypeParameterOfStaticType <TestType> ();
            AccessThroughNewConstraint.TestNewConstraintOnTypeParameterInAnnotatedMethod();
            AccessThroughNewConstraint.TestNewConstraintOnTypeParameterInAnnotatedType();
            AccessThroughLdToken.Test();
        }
        public static void Main()
        {
            TestRequiresWithMessageOnlyOnMethod();
            TestRequiresWithMessageAndUrlOnMethod();
            TestRequiresOnConstructor();
            TestRequiresOnPropertyGetterAndSetter();
            SuppressMethodBodyReferences.Test();
            SuppressGenericParameters <TestType, TestType> .Test();

            TestDuplicateRequiresAttribute();
            TestRequiresUnreferencedCodeOnlyThroughReflection();
            AccessedThroughReflectionOnGenericType <TestType> .Test();

            TestBaseTypeVirtualMethodRequiresUnreferencedCode();
            TestTypeWhichOverridesMethodVirtualMethodRequiresUnreferencedCode();
            TestTypeWhichOverridesMethodVirtualMethodRequiresUnreferencedCodeOnBase();
            TestTypeWhichOverridesVirtualPropertyRequiresUnreferencedCode();
            TestStaticCctorRequiresUnreferencedCode();
            TestStaticCtorMarkingIsTriggeredByFieldAccess();
            TestStaticCtorMarkingIsTriggeredByFieldAccessOnExplicitLayout();
            TestStaticCtorTriggeredByMethodCall();
            TestTypeIsBeforeFieldInit();
            TestDynamicallyAccessedMembersWithRequiresUnreferencedCode(typeof(DynamicallyAccessedTypeWithRequiresUnreferencedCode));
            TestDynamicallyAccessedMembersWithRequiresUnreferencedCode(typeof(TypeWhichOverridesMethod));
            TestInterfaceMethodWithRequiresUnreferencedCode();
            TestCovariantReturnCallOnDerived();
            TestRequiresInMethodFromCopiedAssembly();
            TestRequiresThroughReflectionInMethodFromCopiedAssembly();
            TestRequiresInDynamicallyAccessedMethodFromCopiedAssembly(typeof(RequiresUnreferencedCodeInCopyAssembly.IDerivedInterface));
            TestRequiresInDynamicDependency();
            TestThatTrailingPeriodIsAddedToMessage();
            TestThatTrailingPeriodIsNotDuplicatedInWarningMessage();
            RequiresOnAttribute.Test();
            RequiresOnGenerics.Test();
            CovariantReturnViaLdftn.Test();
            AccessThroughSpecialAttribute.Test();
            AccessThroughPInvoke.Test();
            OnEventMethod.Test();
            AccessThroughNewConstraint.Test();
            AccessThroughLdToken.Test();
        }