Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XC] Avoid NativeAOT trim warnings for compiled bindings #25420

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use issue number
  • Loading branch information
simonrozsival committed Oct 21, 2024
commit ed162a24690e923868460b1ee78da905c2ca0e96
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Microsoft.Maui.Controls.Xaml.UnitTests"
x:Class="Microsoft.Maui.Controls.Xaml.UnitTests.Maui25XXX"
x:DataType="local:Maui25XXXViewModel">
x:Class="Microsoft.Maui.Controls.Xaml.UnitTests.Maui25406"
x:DataType="local:Maui25406ViewModel">

<Label Text="{Binding Text}" />
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

namespace Microsoft.Maui.Controls.Xaml.UnitTests;

public partial class Maui25XXX : ContentPage
public partial class Maui25406 : ContentPage
{
public Maui25XXX()
public Maui25406()
{
InitializeComponent();
}

public Maui25XXX(bool useCompiledXaml)
public Maui25406(bool useCompiledXaml)
{
//this stub will be replaced at compile time
}
Expand All @@ -39,13 +39,13 @@ [TearDown] public void TearDown()
[Test]
public void WhenBindingIsCompiledBindingExtensionDoesNotReceiveServiceProviderWithXamlTypeResolver()
{
MockCompiler.Compile(typeof(Maui25XXX), out var md);
MockCompiler.Compile(typeof(Maui25406), out var md);
Assert.That(!md.Body.Instructions.Any(static i => i.OpCode == OpCodes.Newobj && i.Operand.ToString().Contains("XamlServiceProvider", StringComparison.Ordinal)));
}
}
}

public class Maui25XXXViewModel
public class Maui25406ViewModel
{
public string Text { get; set; }
}