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();
        }
示例#2
0
 public static void Main()
 {
     SuppressMethodBodyReferences.Test();
     SuppressGenericParameters <TestType, TestType> .Test();
 }