Skip to content

Commit 35976a0

Browse files
authored
Merge pull request #21742 from unoplatform/dev/jonpryor/jonp-fix-Uno.UI-il2026-DynamicallyAccessedMemberTypes.All
fix(trimmer): Fix IL2026 warnings around DynamicallyAccessedMemberTypes.All
2 parents 1c76f78 + d9dcb1c commit 35976a0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Uno.UI/DataBinding/BindingPropertyHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ private static DependencyProperty FindDependencyProperty([DynamicallyAccessedMem
12311231

12321232
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Types may be removed or not present as part of the normal operations of that method")]
12331233
[UnconditionalSuppressMessage("Trimming", "IL2057", Justification = "Types may be removed or not present as part of the normal operations of that method")]
1234-
private static object? ConvertUsingTypeDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object value)
1234+
private static object? ConvertUsingTypeDescriptor(Type type, object value)
12351235
{
12361236
var valueTypeConverter = TypeDescriptor.GetConverter(value.GetType());
12371237
if (valueTypeConverter.CanConvertTo(type))
@@ -1295,7 +1295,7 @@ private static DependencyProperty FindDependencyProperty([DynamicallyAccessedMem
12951295
}
12961296

12971297
internal static object? Convert(
1298-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? propertyType,
1298+
Type? propertyType,
12991299
object? value)
13001300
{
13011301
if (value != null)

src/Uno.UI/UI/Xaml/Markup/XamlBindingHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public sealed partial class XamlBindingHelper
2020
/// Converts a value from a source type to a target type.
2121
/// </summary>
2222
public static object ConvertValue(
23-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type,
23+
Type type,
2424
object value)
2525
=> Uno.UI.DataBinding.BindingPropertyHelper.Convert(type, value);
2626

src/Uno.UI/UI/Xaml/ResourceResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static T ResolveResourceStatic<T>(object key, object context = null)
8585
[EditorBrowsable(EditorBrowsableState.Never)]
8686
public static object ResolveResourceStatic(
8787
object key,
88-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type,
88+
Type type,
8989
object context = null)
9090
{
9191
if (TryStaticRetrieval(new SpecializedResourceDictionary.ResourceKey(key), context, out var value))

src/Uno.UI/UI/Xaml/ResourceResolverSingleton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static ResourceResolverSingleton Instance
3232
[EditorBrowsable(EditorBrowsableState.Never)]
3333
public object ResolveResourceStatic(
3434
object key,
35-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type,
35+
Type type,
3636
object context)
3737
=> ResourceResolver.ResolveResourceStatic(key, type, context);
3838

0 commit comments

Comments
 (0)