From 6a8ff61b070e858db56d778006af8237c6c0a774 Mon Sep 17 00:00:00 2001 From: GH Cao Date: Fri, 26 Jul 2024 12:42:09 +0800 Subject: [PATCH] Forward Size, Rect and Point from WinRT.Runtime, fix MeasureOverride --- ModernXamlCompiler/ModernXamlCompiler.msbuildproj | 8 ++++---- ...DisposableMemory.ModernNetUAP.XamlCompiler.targets | 6 +++--- shims/SystemRuntimeWindowsRuntimeShim/Shim.cs | 11 ++++------- .../SystemRuntimeWindowsRuntimeShim.csproj | 8 +++++++- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ModernXamlCompiler/ModernXamlCompiler.msbuildproj b/ModernXamlCompiler/ModernXamlCompiler.msbuildproj index 1653e98..b2ca764 100644 --- a/ModernXamlCompiler/ModernXamlCompiler.msbuildproj +++ b/ModernXamlCompiler/ModernXamlCompiler.msbuildproj @@ -5,7 +5,7 @@ DisposableMemory.ModernNetUAP.XamlCompiler - 0.1.0-preview2 + 0.1.0-preview3 driver1998 UWP (Windows.UI.Xaml) Xaml Compiler support for Modern .NET https://github.com/driver1998/ModernNetUAP.XamlCompiler @@ -17,17 +17,17 @@ Content true - shims\netstandard2.0 + shims Content true - shims\netstandard2.0 + shims Content true - shims\netstandard2.0 + shims diff --git a/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets b/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets index 9aa295e..45b3e1a 100644 --- a/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets +++ b/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets @@ -32,9 +32,9 @@ - - - + + + diff --git a/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs b/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs index 43a739a..15e99c0 100644 --- a/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs +++ b/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs @@ -1,4 +1,8 @@ using System; +using System.Runtime.CompilerServices; +[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Size))] +[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Rect))] +[assembly: TypeForwardedToAttribute(typeof(Windows.Foundation.Point))] namespace Windows.UI { @@ -18,11 +22,4 @@ public struct Color : IFormattable string IFormattable.ToString(string format, IFormatProvider formatProvider) => throw new NotImplementedException(); public string ToString(IFormatProvider formatProvider) => throw new NotImplementedException(); } -} - -namespace Windows.Foundation -{ - internal struct Point { } - internal struct Rect { } - internal struct Size { } } \ No newline at end of file diff --git a/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj b/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj index b883222..7d7e07c 100644 --- a/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj +++ b/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + net6.0 System.Runtime.WindowsRuntime True true @@ -12,4 +12,10 @@ false + + + + + +