public static void Main()
        {
            var warningsInType = new WarningsInType();

            warningsInType.Warning1();
            warningsInType.Warning2();
            var warningInNestedType = new WarningsInType.NestedType();

            warningInNestedType.Warning3();

            var warningsInMembers = new WarningsInMembers();

            warningsInMembers.Method();
            int propertyThatTriggersWarning = warningsInMembers.Property;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This test case checks module level UnconditionalSuppressMessage, primarily using
        /// System.Linq.Expressions.Expression.(Type type, string methodName, Type[]? typeArguments, params System.Linq.Expressions.Expression[]? arguments)
        /// which has a RUC attribute but is treated as an intrinsic by the trimmer. The test case also has some member level suppressions and its
        /// own RUC method (the IL2026 suppression in the code is due to this)
        /// </summary>
        public static void Main()
        {
            NestedType.Warning();
            var warningsInType = new WarningsInType();

            warningsInType.Warning1();
            var warningInNestedType = new WarningsInType.NestedType();

            warningInNestedType.Warning3();

            var warningsInMembers = new WarningsInMembers();

            warningsInMembers.Method();
            int propertyThatTriggersWarning = warningsInMembers.Property;

            WarningsInMembers.MultipleWarnings();
            WarningsInMembers.MultipleSuppressions();
        }