-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codegen): BindableMetadata properly globalizing generic type pare…
…meters
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/SamplesApp/UITests.Shared/Xaml_CodeGen/BindableMetadataGlobalizationTest.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Page x:Class="UITests.Xaml_CodeGen.BindableMetadataGlobalizationTest" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Xaml_CodeGen" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<Grid /> | ||
</Page> |
39 changes: 39 additions & 0 deletions
39
src/SamplesApp/UITests.Shared/Xaml_CodeGen/BindableMetadataGlobalizationTest.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace UITests.Xaml_CodeGen | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class BindableMetadataGlobalizationTest : Page | ||
{ | ||
// #2815: generic type parameter are not prefixed with `global::` during BindableTypeProvidersSourceGenerator | ||
// which causes CS0234, "type or namespace name X not found in Y", in some case like here. | ||
// the BindableMetadata are generated with a RootNamespace `SamplesApp.${platform}`, and | ||
// `UITests.Xaml_CodeGen.TestAsd` is then resolved to `SamplesApp.UITests.Xaml_CodeGen.TestAsd` | ||
// since `SamplesApp.UITests` has a higher precedence than `global::UITests`, even if `Xaml_CodeGen` is not declared there. | ||
public IEnumerable<TestAsd> MyProperty { get; set; } | ||
|
||
public BindableMetadataGlobalizationTest() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
|
||
public class TestAsd { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters