Skip to content

Commit

Permalink
fix: Fix invalid code gen
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Dec 6, 2024
1 parent fb04847 commit c79074b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void InitializeComponent()
{
// var __that = (MainPage)__ResourceOwner_1;
return
new global::Microsoft.UI.Xaml.DataTemplate(this, (__owner) => new _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0().Build(__owner)
new global::Microsoft.UI.Xaml.DataTemplate(__ResourceOwner_1, (__owner) => new _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0().Build(__owner)
) .GenericApply(__that, __nameScope, (ApplyMethod_6 ))
;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void InitializeComponent()
{
// var __that = (MainPage)__ResourceOwner_1;
return
new global::Microsoft.UI.Xaml.DataTemplate(this, (__owner) => new _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0().Build(__owner)
new global::Microsoft.UI.Xaml.DataTemplate(__ResourceOwner_1, (__owner) => new _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0().Build(__owner)
) .GenericApply(__that, __nameScope, (ApplyMethod_6 ))
;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void InitializeComponent()
{
// var __that = (MyResourceDictionary)__ResourceOwner_1;
return
new global::Microsoft.UI.Xaml.DataTemplate(this, (__owner) => new _MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_TestReproMyResourceDictionarySC0().Build(__owner)
new global::Microsoft.UI.Xaml.DataTemplate(__ResourceOwner_1, (__owner) => new _MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_TestReproMyResourceDictionarySC0().Build(__owner)
) ;
}
)
Expand Down Expand Up @@ -194,7 +194,7 @@ public ResourceDictionarySingleton__MyResourceDictionary_92716e07ff456818f6d4125
[global::System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026")]
[global::System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2111")]
private object Get_1(object __ResourceOwner_1) =>
new global::Microsoft.UI.Xaml.DataTemplate(this, (__owner) => new __Resources._MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_MyResourceDictionaryRDSC1().Build(__owner)
new global::Microsoft.UI.Xaml.DataTemplate(__ResourceOwner_1, (__owner) => new __Resources._MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_MyResourceDictionaryRDSC1().Build(__owner)
) ;

private global::Microsoft.UI.Xaml.ResourceDictionary _MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_ResourceDictionary;
Expand All @@ -216,7 +216,7 @@ private object Get_1(object __ResourceOwner_1) =>
{
// var __that = (MyResourceDictionaryRD)__ResourceOwner_1;
return
new global::Microsoft.UI.Xaml.DataTemplate(this, (__owner) => new __Resources._MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_MyResourceDictionaryRDSC2().Build(__owner)
new global::Microsoft.UI.Xaml.DataTemplate(__ResourceOwner_1, (__owner) => new __Resources._MyResourceDictionary_92716e07ff456818f6d4125e055d4d57_MyResourceDictionaryRDSC2().Build(__owner)
) ;
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6846,7 +6846,7 @@ private string? CurrentResourceOwner
=> _resourceOwner != 0 ? $"__ResourceOwner_{_resourceOwner.ToString(CultureInfo.InvariantCulture)}" : null;

private string CurrentResourceOwnerName
=> /*CurrentResourceOwner ??*/ "this";
=> CurrentResourceOwner ?? "this";

public bool HasImplicitViewPinning
=> Generation.IOSViewSymbol.Value is not null || Generation.AppKitViewSymbol.Value is not null;
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.UI/Helpers/MarkupHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public static void SetVisualTransitionLazy(VisualTransition target, Action build
target.FromLegacyTemplate = TemplatedParentScope.GetCurrentTemplate() is { IsLegacyTemplate: true };
}

public static IXamlServiceProvider CreateParserContext(object? target, Type propertyDeclaringType, string propertyName, Type propertyType) =>
CreateParserContext(target, propertyDeclaringType, propertyName, propertyType, null);
public static IXamlServiceProvider CreateParserContext(object? target, Type propertyDeclaringType, string propertyName, Type propertyType)
=> CreateParserContext(target, propertyDeclaringType, propertyName, propertyType, null);

public static IXamlServiceProvider CreateParserContext(object? target, Type propertyDeclaringType, string propertyName, Type propertyType, object? rootObject)
=> new XamlServiceProviderContext
Expand Down

0 comments on commit c79074b

Please sign in to comment.