From 83cf16cc313c5349be4d5b31909b262f2bca0d1e Mon Sep 17 00:00:00 2001 From: Simon Rozsival Date: Fri, 15 Dec 2023 15:26:37 +0100 Subject: [PATCH] Remove fixed warnings from tests --- .../Utilities/BuildWarningsUtilities.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs index ba38fc0e5b40..2bbfb716a966 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs @@ -168,6 +168,38 @@ public static void AssertWarnings(this List actualWarnings, Lis "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetImplicitConversionOperator(Type,Type,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'. The parameter '#0' of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetImplicitConversionOperator(Type,Type,Type)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", } }, + new WarningsPerCode + { + Code = "IL2072", + Messages = new List + { + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.<>c__DisplayClass2_0.b__0(): 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The return value of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.<>c__DisplayClass2_0.b__0(): 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The return value of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", + } + }, + new WarningsPerCode + { + Code = "IL2057", + Messages = new List + { + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1): Unrecognized value passed to the parameter 'typeName' of method 'System.Type.GetType(String)'. It's not possible to guarantee the availability of the target type.", + } + }, + } + }, + new WarningsPerFile + { + File = "src/Controls/src/Core/Routing.cs", + WarningsPerCode = new List + { + new WarningsPerCode + { + Code = "IL2111", + Messages = new List + { + "Microsoft.Maui.Controls.Routing..cctor(): Method 'Microsoft.Maui.Controls.Routing.RegisterRoute(String,Type)' with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.", + } + }, } }, new WarningsPerFile