From d16559963c6ff69355344240156f230432302e19 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Dec 2024 15:12:40 -0600 Subject: [PATCH] Revert "Fix AoT errors in FrameworkElementExtensions, update submodule" This reverts commit d5fa8ba309df1ec73ac167f3e603ff0cae27f496. --- .../src/Tree/FrameworkElementExtensions.LogicalTree.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 2e1b9d51..52d27723 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Reflection; using CommunityToolkit.WinUI.Predicates; -using System.Diagnostics.CodeAnalysis; #nullable enable @@ -96,7 +95,7 @@ public static partial class FrameworkElementExtensions /// The root element. /// The predicatee to use to match the child nodes. /// The child that was found, or . - private static T? FindChild([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element, ref TPredicate predicate) + private static T? FindChild(this FrameworkElement element, ref TPredicate predicate) where T : notnull, FrameworkElement where TPredicate : struct, IPredicate { @@ -663,7 +662,7 @@ public static IEnumerable FindParents(this FrameworkElement el /// /// The parent element. /// The retrieved content control, or if not available. - public static UIElement? GetContentControl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element) + public static UIElement? GetContentControl(this FrameworkElement element) { Type type = element.GetType(); TypeInfo? typeInfo = type.GetTypeInfo();