From a9fa811d6a56e0b68aaebb51ad74ac0be5a84456 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 9 Dec 2024 22:41:53 -0500 Subject: [PATCH] fix(hr): Fix invalid gen for top level dic --- .../XamlGenerator/XamlFileGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs index e1d5d4dcf467..3476a94be03e 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs @@ -3113,7 +3113,7 @@ private void BuildExtendedProperties(IIndentedStringBuilder outerwriter, XamlObj } else { - BuildCustomMarkupExtensionPropertyValue(writer, member, closureName, $"(({CurrentScope.ClassName})__that)"); + BuildCustomMarkupExtensionPropertyValue(writer, member, closureName, _isTopLevelDictionary ? null : $"(({CurrentScope.ClassName})__that)"); } } else if (member.Objects.Count > 0) @@ -3475,7 +3475,7 @@ private void BuildExtendedProperties(IIndentedStringBuilder outerwriter, XamlObj } // Local function used to build a property/value for any custom MarkupExtensions - void BuildCustomMarkupExtensionPropertyValue(IIndentedStringBuilder writer, XamlMemberDefinition member, string closure, string resourceOwner) + void BuildCustomMarkupExtensionPropertyValue(IIndentedStringBuilder writer, XamlMemberDefinition member, string closure, string? resourceOwner) { var propertyValue = GetCustomMarkupExtensionValue(member, closure, resourceOwner); if (!propertyValue.IsNullOrEmpty())