diff --git a/BuildTasks/BuildTasks.csproj b/BuildTasks/BuildTasks.csproj new file mode 100644 index 0000000..67280a8 --- /dev/null +++ b/BuildTasks/BuildTasks.csproj @@ -0,0 +1,13 @@ + + + + netstandard2.0 + DisposableMemory.ModernUAP.BuildTasks + 8 + + + + + + + \ No newline at end of file diff --git a/BuildTasks/GenerateFakeWinMD.cs b/BuildTasks/GenerateFakeWinMD.cs new file mode 100644 index 0000000..ef1aefb --- /dev/null +++ b/BuildTasks/GenerateFakeWinMD.cs @@ -0,0 +1,73 @@ +using System; +using System.Linq; +using System.Runtime.CompilerServices; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using Mono.Cecil; + +namespace DisposableMemory.ModernUAP.BuildTasks +{ + public class GenerateFakeWinMD : Task + { + [Required] + public ITaskItem[] SourceProjectionDlls { get; set; } + + [Required] + public string TargetWinMD { get; set; } + + public override bool Execute() + { + try + { + Log.LogMessage(MessageImportance.High, "Generating Fake WinMD..."); + + var assemblyName = new AssemblyNameDefinition("Windows.FakeWinMetadata", new Version(0, 0, 0, 0)); + using var outputAssembly = AssemblyDefinition.CreateAssembly(assemblyName, "Windows.FakeWinMetadata.dll", ModuleKind.Dll); + outputAssembly.Name.IsWindowsRuntime = true; + + var outputModule = outputAssembly.MainModule; + MethodReference fowardedToAttrCtor = outputModule.ImportReference(typeof(TypeForwardedToAttribute).GetConstructor(new Type[] { typeof(Type) })); + + var sourceAssemblyList = SourceProjectionDlls.Select(p => p.ItemSpec).ToList(); + Log.LogMessage(MessageImportance.High, "Source projections: \n" + string.Join("\n", sourceAssemblyList)); + + foreach (var sourceAssemblyFile in sourceAssemblyList) + { + using var sourceAssembly = AssemblyDefinition.ReadAssembly(sourceAssemblyFile); + foreach (var type in sourceAssembly.MainModule.Types) + { + if (string.IsNullOrEmpty(type.Namespace)) + { + continue; + } + if (!type.IsPublic) + { + continue; + } + if (!type.CustomAttributes.Any(p => p.AttributeType.FullName == "WinRT.WindowsRuntimeTypeAttribute")) + { + continue; + } + + var attr = new CustomAttribute(fowardedToAttrCtor); + var typeRef = outputModule.ImportReference(type); + var attrParam = new CustomAttributeArgument(outputModule.ImportReference(typeof(Type)), typeRef); + attr.ConstructorArguments.Add(attrParam); + outputAssembly.CustomAttributes.Add(attr); + outputModule.ExportedTypes.Add(new ExportedType(typeRef.Namespace, typeRef.Name, typeRef.Module, typeRef.Scope)); + } + } + + outputAssembly.Write(TargetWinMD); + Log.LogMessage(MessageImportance.High, "Output file: " + TargetWinMD); + return true; + } + catch (Exception ex) + { + Log.LogErrorFromException(ex, showStackTrace: true); + return false; + } + + } + } +} diff --git a/BuildTasks/NativeAotFixup.cs b/BuildTasks/NativeAotFixup.cs new file mode 100644 index 0000000..a7c46ff --- /dev/null +++ b/BuildTasks/NativeAotFixup.cs @@ -0,0 +1,69 @@ +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using System; +using System.IO; +using System.Text.RegularExpressions; + +namespace BuildTasks +{ + public class NativeAotFixup : Task + { + [Required] + public string ObjDirectory { get; set; } + + public override bool Execute() + { + try + { + { + var xamlTypeInfoCs = Path.Combine(ObjDirectory, "XamlTypeInfo.g.cs"); + if (!File.Exists(xamlTypeInfoCs)) + { + Log.LogError("XamlTypeInfo.g.cs does not exist in " + ObjDirectory); + return false; + } + var str = File.ReadAllText(xamlTypeInfoCs); + str = Regex.Replace(str, + "public sealed class XamlMetaDataProvider : global::Windows.UI.Xaml.Markup.IXamlMetadataProvider", + "public sealed partial class XamlMetaDataProvider : global::Windows.UI.Xaml.Markup.IXamlMetadataProvider"); + str = Regex.Replace(str, + "internal class XamlSystemBaseType : global::Windows.UI.Xaml.Markup.IXamlType", + "internal partial class XamlSystemBaseType : global::Windows.UI.Xaml.Markup.IXamlType"); + str = Regex.Replace(str, + "internal class XamlUserType : global::(.*?)_XamlTypeInfo.XamlSystemBaseType", + "internal partial class XamlUserType : global::$1_XamlTypeInfo.XamlSystemBaseType"); + str = Regex.Replace(str, + "internal class XamlMember : global::Windows.UI.Xaml.Markup.IXamlMember", + "internal partial class XamlMember : global::Windows.UI.Xaml.Markup.IXamlMember"); + File.WriteAllText(xamlTypeInfoCs, str); + } + + var pagePass2CsList = Directory.GetFiles(ObjDirectory, "*.g.cs"); + foreach (var pagePass2Cs in pagePass2CsList) + { + var filename = Path.GetFileName(pagePass2Cs); + if (string.Equals(filename, "App.g.cs", StringComparison.InvariantCultureIgnoreCase) || + string.Equals(filename, "XamlTypeInfo.g.cs", StringComparison.InvariantCultureIgnoreCase)) + { + continue; + } + + var path = Path.Combine(ObjDirectory, filename); + + var str = File.ReadAllText(path); + str = Regex.Replace(str, + "private class (.*?_obj\\d*_Bindings) :(\\s+global::Windows.UI.Xaml.(?:IDataTemplateExtension|Markup.IDataTemplateComponent|Markup.IXamlBindScopeDiagnostics|Markup.IComponentConnector),)", + "private partial class $1 :$2"); + File.WriteAllText(path, str); + } + + return true; + } + catch (Exception ex) + { + Log.LogErrorFromException(ex, showStackTrace: true); + return false; + } + } + } +} diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..0fd0508 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,6 @@ + + + + <_PkgMono_Cecil_Version>0.11.5 + + diff --git a/ModernXamlCompiler.sln b/ModernXamlCompiler.sln index c26b4f1..8b072c3 100644 --- a/ModernXamlCompiler.sln +++ b/ModernXamlCompiler.sln @@ -3,19 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33502.453 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemInteropServicesWindowsRuntimeShim", "shims\SystemInteropServicesWindowsRuntimeShim\SystemInteropServicesWindowsRuntimeShim.csproj", "{67C08941-8DA6-410D-885B-DD8ADF0AADB2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemRuntimeWindowsRuntimeShim", "shims\SystemRuntimeWindowsRuntimeShim\SystemRuntimeWindowsRuntimeShim.csproj", "{ECE5D9A3-78B7-43B8-8904-08196DEFE4E0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemRuntimeWindowsRuntimeXamlShim", "shims\SystemRuntimeWindowsRuntimeXamlShim\SystemRuntimeWindowsRuntimeXamlShim.csproj", "{08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A}" -EndProject Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "ModernXamlCompiler", "ModernXamlCompiler\ModernXamlCompiler.msbuildproj", "{909246B3-1658-4E63-8030-4DB48442248A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shims", "Shims", "{59A8A63D-C0F4-4A65-A90B-D696DFA9B0CF}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projections", "Projections", "{F3E8B257-26E3-4527-B03D-3302576A2F47}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIProjection", "projections\WinUI\WinUIProjection.csproj", "{A678867C-D533-49BE-81A5-B0DDE7FEC701}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIProjection", "Projections\WinUI\WinUIProjection.csproj", "{A678867C-D533-49BE-81A5-B0DDE7FEC701}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildTasks", "BuildTasks\BuildTasks.csproj", "{8ED633AD-A29E-4919-8F5B-5D564F62BB9B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -23,18 +17,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {67C08941-8DA6-410D-885B-DD8ADF0AADB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67C08941-8DA6-410D-885B-DD8ADF0AADB2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67C08941-8DA6-410D-885B-DD8ADF0AADB2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67C08941-8DA6-410D-885B-DD8ADF0AADB2}.Release|Any CPU.Build.0 = Release|Any CPU - {ECE5D9A3-78B7-43B8-8904-08196DEFE4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECE5D9A3-78B7-43B8-8904-08196DEFE4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECE5D9A3-78B7-43B8-8904-08196DEFE4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECE5D9A3-78B7-43B8-8904-08196DEFE4E0}.Release|Any CPU.Build.0 = Release|Any CPU - {08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A}.Release|Any CPU.Build.0 = Release|Any CPU {909246B3-1658-4E63-8030-4DB48442248A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {909246B3-1658-4E63-8030-4DB48442248A}.Debug|Any CPU.Build.0 = Debug|Any CPU {909246B3-1658-4E63-8030-4DB48442248A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -43,14 +25,15 @@ Global {A678867C-D533-49BE-81A5-B0DDE7FEC701}.Debug|Any CPU.Build.0 = Debug|Any CPU {A678867C-D533-49BE-81A5-B0DDE7FEC701}.Release|Any CPU.ActiveCfg = Release|Any CPU {A678867C-D533-49BE-81A5-B0DDE7FEC701}.Release|Any CPU.Build.0 = Release|Any CPU + {8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8ED633AD-A29E-4919-8F5B-5D564F62BB9B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {67C08941-8DA6-410D-885B-DD8ADF0AADB2} = {59A8A63D-C0F4-4A65-A90B-D696DFA9B0CF} - {ECE5D9A3-78B7-43B8-8904-08196DEFE4E0} = {59A8A63D-C0F4-4A65-A90B-D696DFA9B0CF} - {08CDDB70-E1D7-40E3-A5E8-B26EA3E0944A} = {59A8A63D-C0F4-4A65-A90B-D696DFA9B0CF} {A678867C-D533-49BE-81A5-B0DDE7FEC701} = {F3E8B257-26E3-4527-B03D-3302576A2F47} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/ModernXamlCompiler/ModernXamlCompiler.msbuildproj b/ModernXamlCompiler/ModernXamlCompiler.msbuildproj index 46a20c7..6a23751 100644 --- a/ModernXamlCompiler/ModernXamlCompiler.msbuildproj +++ b/ModernXamlCompiler/ModernXamlCompiler.msbuildproj @@ -5,7 +5,7 @@ DisposableMemory.ModernNetUAP.XamlCompiler - 0.1.0 + 0.2.0 driver1998 UWP (Windows.UI.Xaml) Xaml Compiler support for Modern .NET https://github.com/driver1998/ModernNetUAP.XamlCompiler @@ -14,27 +14,32 @@ - + Content + all true - shims - - - Content - true - shims - - - Content - true - shims + tasks - + + + + + + + + + true + tasks + + + diff --git a/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets b/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets index 17ac16a..c76099f 100644 --- a/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets +++ b/ModernXamlCompiler/build/DisposableMemory.ModernNetUAP.XamlCompiler.targets @@ -8,118 +8,47 @@ 10.0 $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\$(SDKIdentifier)\v$(SDKVersion)', 'InstallationFolder', null, RegistryView.Registry32, RegistryView.Default)) $(WindowsSdkPath)bin\$(TargetPlatformVersion)\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets + $(MSBuildThisFileDirectory)\..\tasks\DisposableMemory.ModernUAP.BuildTasks.dll - - + + + + $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.Windows.SDK.NET.Ref', '$(WindowsSdkPackageVersion)')) - - $(DefineConstants) - $(DefineConstants);COMPILING_XAML + $(IntermediateOutputPath)Windows.FakeWinMetadata.winmd - - - - - - - - - - - + + + + + - - - - + + - - + - - $(DefineConstantsBackup) - - - - + - - - - - - - - - - - - - - - - + - diff --git a/README.md b/README.md index 842d139..48f2238 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,5 @@ Provides basic support for Windows.UI.Xaml (UWP) XAML codegen in Visual Studio f # Acknowledgements - Microsoft +- Mono.Cecil for fake WinMD generation - Mile.Xaml for XAML compiler enablement diff --git a/projections/WinUI/WinUIProjection.csproj b/projections/WinUI/WinUIProjection.csproj index a59723e..ce62941 100644 --- a/projections/WinUI/WinUIProjection.csproj +++ b/projections/WinUI/WinUIProjection.csproj @@ -12,7 +12,7 @@ DisposableMemory.ModernNetUAP.WinUI - 2.8.6 + 2.8.6.1 driver1998 WinUI 2.x Projections and build support for Modern .NET, requires DisposableMemory.ModernNetUAP.XamlCompiler package. https://github.com/driver1998/ModernNetUAP.XamlCompiler diff --git a/projections/WinUI/build/DisposableMemory.ModernNetUAP.WinUI.targets b/projections/WinUI/build/DisposableMemory.ModernNetUAP.WinUI.targets index d0ca39c..bd4eb5f 100644 --- a/projections/WinUI/build/DisposableMemory.ModernNetUAP.WinUI.targets +++ b/projections/WinUI/build/DisposableMemory.ModernNetUAP.WinUI.targets @@ -2,28 +2,18 @@ - $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.ui.xaml', '$(_PkgWinUI_Version)')) $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.web.webview2', '$(_PkgWebView2_Version)')) - $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..')) - - - - - - - - - - - - + + + + - \ No newline at end of file diff --git a/shims/Snks/ECMA.snk b/shims/Snks/ECMA.snk deleted file mode 100644 index efafe92..0000000 Binary files a/shims/Snks/ECMA.snk and /dev/null differ diff --git a/shims/Snks/MSFT.snk b/shims/Snks/MSFT.snk deleted file mode 100644 index 110b59c..0000000 Binary files a/shims/Snks/MSFT.snk and /dev/null differ diff --git a/shims/SystemInteropServicesWindowsRuntimeShim/Shim.cs b/shims/SystemInteropServicesWindowsRuntimeShim/Shim.cs deleted file mode 100644 index 640a919..0000000 --- a/shims/SystemInteropServicesWindowsRuntimeShim/Shim.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Runtime.CompilerServices; -using Windows.Foundation; - -namespace System -{ - public static class IAsyncOperationExtensions - { - public static TaskAwaiter GetAwaiter(this IAsyncOperation op) - { - return default; - } - - public static TaskAwaiter GetAwaiter(this IAsyncAction op) - { - return default; - } - } -} - -namespace System.Runtime.InteropServices.WindowsRuntime -{ - public struct EventRegistrationToken { } - - public sealed class EventRegistrationTokenTable where T : class - { - public T InvocationList { get; set; } - public EventRegistrationToken AddEventHandler(T handler) { return default; } - public static EventRegistrationTokenTable GetOrCreateEventRegistrationTokenTable(ref EventRegistrationTokenTable refEventTable) { return default; } - public void RemoveEventHandler(EventRegistrationToken token) { } - public void RemoveEventHandler(T handler) { } - } - public interface IActivationFactory { } - public static class WindowsRuntimeMarshal - { - public static void AddEventHandler(Func addMethod, Action removeMethod, T handler) { } - public static void RemoveAllEventHandlers(Action removeMethod) { } - public static void RemoveEventHandler(Action removeMethod, T handler) { } - } -} \ No newline at end of file diff --git a/shims/SystemInteropServicesWindowsRuntimeShim/SystemInteropServicesWindowsRuntimeShim.csproj b/shims/SystemInteropServicesWindowsRuntimeShim/SystemInteropServicesWindowsRuntimeShim.csproj deleted file mode 100644 index 55333c8..0000000 --- a/shims/SystemInteropServicesWindowsRuntimeShim/SystemInteropServicesWindowsRuntimeShim.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netstandard2.0 - System.Runtime.InteropServices.WindowsRuntime - True - true - 4.0.0.0 - ../Snks/MSFT.snk - 002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293 - b03f5f7f11d50a3a - false - - - - - - diff --git a/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs b/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs deleted file mode 100644 index 15e99c0..0000000 --- a/shims/SystemRuntimeWindowsRuntimeShim/Shim.cs +++ /dev/null @@ -1,25 +0,0 @@ -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 -{ - public struct Color : IFormattable - { - public byte A { get; set; } - public byte B { get; set; } - public byte G { get; set; } - public byte R { get; set; } - public static Color FromArgb(byte a, byte r, byte g, byte b) => throw new NotImplementedException(); - public override bool Equals(object o) => throw new NotImplementedException(); - public bool Equals(Color color) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public static bool operator ==(Color color1, Color color2) => throw new NotImplementedException(); - public static bool operator !=(Color color1, Color color2) => throw new NotImplementedException(); - string IFormattable.ToString(string format, IFormatProvider formatProvider) => throw new NotImplementedException(); - public string ToString(IFormatProvider formatProvider) => throw new NotImplementedException(); - } -} \ No newline at end of file diff --git a/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj b/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj deleted file mode 100644 index 1b11420..0000000 --- a/shims/SystemRuntimeWindowsRuntimeShim/SystemRuntimeWindowsRuntimeShim.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net6.0 - System.Runtime.WindowsRuntime - True - true - 4.0.0.0 - ../Snks/ECMA.snk - 00000000000000000400000000000000 - b77a5c561934e089 - false - - - - - - - - - diff --git a/shims/SystemRuntimeWindowsRuntimeXamlShim/Shim.cs b/shims/SystemRuntimeWindowsRuntimeXamlShim/Shim.cs deleted file mode 100644 index 77ea217..0000000 --- a/shims/SystemRuntimeWindowsRuntimeXamlShim/Shim.cs +++ /dev/null @@ -1,194 +0,0 @@ -using System; - -namespace Windows.UI.Xaml -{ - public struct Thickness - { - public double Left { get; set; } - public double Top { get; set; } - public double Right { get; set; } - public double Bottom { get; set; } - public Thickness(double uniformLength) => throw new NotImplementedException(); - public Thickness(double left, double top, double right, double bottom) => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public override bool Equals(object obj) => throw new NotImplementedException(); - public bool Equals(Thickness thickness) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public static bool operator ==(Thickness t1, Thickness t2) => throw new NotImplementedException(); - public static bool operator !=(Thickness t1, Thickness t2) => throw new NotImplementedException(); - } - public struct GridLength - { - public double Value { get; } - public GridUnitType GridUnitType { get; } - public bool IsAbsolute { get; } - public bool IsAuto { get; } - public bool IsStar { get; } - public static GridLength Auto { get; } - public GridLength(double pixels) => throw new NotImplementedException(); - public GridLength(double value, GridUnitType type) => throw new NotImplementedException(); - public static bool operator ==(GridLength gl1, GridLength gl2) => throw new NotImplementedException(); - public static bool operator !=(GridLength gl1, GridLength gl2) => throw new NotImplementedException(); - public override bool Equals(object oCompare) => throw new NotImplementedException(); - public bool Equals(GridLength gridLength) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - } - public enum GridUnitType - { - Auto, - Pixel, - Star - } - public struct CornerRadius - { - public double TopLeft { get; set; } - public double TopRightt { get; set; } - public double BottomRightt { get; set; } - public double BottomLeftt { get; set; } - public CornerRadius(double uniformRadius) => throw new NotImplementedException(); - public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft) => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public override bool Equals(object obj) => throw new NotImplementedException(); - public bool Equals(CornerRadius cornerRadius) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public static bool operator ==(CornerRadius cr1, CornerRadius cr2) => throw new NotImplementedException(); - public static bool operator !=(CornerRadius cr1, CornerRadius cr2) => throw new NotImplementedException(); - } - public struct Duration - { - public bool HasTimeSpan { get; } - public static Duration Automatic { get; } - public static Duration Forever { get; } - public TimeSpan TimeSpan { get; } - public Duration(TimeSpan timeSpan) => throw new NotImplementedException(); - public static implicit operator Duration(TimeSpan timeSpan) => throw new NotImplementedException(); - public static Duration operator +(Duration t1, Duration t2) => throw new NotImplementedException(); - public static Duration operator -(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator ==(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator !=(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator >(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator >=(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator <(Duration t1, Duration t2) => throw new NotImplementedException(); - public static bool operator <=(Duration t1, Duration t2) => throw new NotImplementedException(); - public static int Compare(Duration t1, Duration t2) => throw new NotImplementedException(); - public static Duration operator +(Duration duration) => throw new NotImplementedException(); - public Duration Add(Duration duration) => throw new NotImplementedException(); - public override bool Equals(object value) => throw new NotImplementedException(); - public bool Equals(Duration duration) => throw new NotImplementedException(); - public static bool Equals(Duration t1, Duration t2) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public Duration Subtract(Duration duration) => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - } - public enum DurationType - { - Automatic, - TimeSpan, - Forever - } - namespace Media - { - public struct Matrix : IFormattable - { - public double M11 { get; set; } - public double M12 { get; set; } - public double M21 { get; set; } - public double M22 { get; set; } - public double OffsetX { get; set; } - public double OffsetY { get; set; } - public static Matrix Identity { get; } - public bool IsIdentity { get; } - public Matrix(double m11, double m12, double m21, double m22, double offsetX, double offsetY) => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public string ToString(IFormatProvider provider) => throw new NotImplementedException(); - string IFormattable.ToString(string format, IFormatProvider provider) => throw new NotImplementedException(); - public object Transform(object point) => throw new NotImplementedException(); - public T Transform(T point) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public override bool Equals(object o) => throw new NotImplementedException(); - public bool Equals(Matrix value) => throw new NotImplementedException(); - public static bool operator ==(Matrix matrix1, Matrix matrix2) => throw new NotImplementedException(); - public static bool operator !=(Matrix matrix1, Matrix matrix2) => throw new NotImplementedException(); - } - namespace Animation - { - public struct KeyTime - { - public TimeSpan TimeSpan { get; } - public static KeyTime FromTimeSpan(TimeSpan timeSpan) => throw new NotImplementedException(); - public static bool Equals(KeyTime keyTime1, KeyTime keyTime2) => throw new NotImplementedException(); - public static bool operator ==(KeyTime keyTime1, KeyTime keyTime2) => throw new NotImplementedException(); - public static bool operator !=(KeyTime keyTime1, KeyTime keyTime2) => throw new NotImplementedException(); - public bool Equals(KeyTime value) => throw new NotImplementedException(); - public override bool Equals(object value) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public static implicit operator KeyTime(TimeSpan timeSpan) => throw new NotImplementedException(); - } - public struct RepeatBehavior : IFormattable - { - public static RepeatBehavior Forever { get; } - public bool HasCount { get; } - public bool HasDuration { get; } - public double Count { get; set; } - public TimeSpan Duration { get; set; } - public RepeatBehaviorType Type { get; set; } - public RepeatBehavior(double count) => throw new NotImplementedException(); - public RepeatBehavior(TimeSpan duration) => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public string ToString(IFormatProvider formatProvider) => throw new NotImplementedException(); - string IFormattable.ToString(string format, IFormatProvider formatProvider) => throw new NotImplementedException(); - public override bool Equals(object value) => throw new NotImplementedException(); - public bool Equals(RepeatBehavior repeatBehavior) => throw new NotImplementedException(); - public static bool Equals(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public static bool operator ==(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2) => throw new NotImplementedException(); - public static bool operator !=(RepeatBehavior repeatBehavior1, RepeatBehavior repeatBehavior2) => throw new NotImplementedException(); - } - public enum RepeatBehaviorType - { - Count, - Duration, - Forever - } - } - namespace Media3D - { - public struct Matrix3D : IFormattable - { - public double M11 { get; set; } - public double M12 { get; set; } - public double M13 { get; set; } - public double M14 { get; set; } - public double M21 { get; set; } - public double M22 { get; set; } - public double M23 { get; set; } - public double M24 { get; set; } - public double M31 { get; set; } - public double M32 { get; set; } - public double M33 { get; set; } - public double M34 { get; set; } - public double OffsetX { get; set; } - public double OffsetY { get; set; } - public double OffsetZ { get; set; } - public double M44 { get; set; } - public static Matrix3D Identity { get; } - public bool IsIdentity { get; } - public bool HasInverse { get; } - public Matrix3D(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double offsetX, double offsetY, double offsetZ, double m44) - => throw new NotImplementedException(); - public override string ToString() => throw new NotImplementedException(); - public string ToString(IFormatProvider provider) => throw new NotImplementedException(); - string IFormattable.ToString(string format, IFormatProvider provider) => throw new NotImplementedException(); - public override int GetHashCode() => throw new NotImplementedException(); - public override bool Equals(object o) => throw new NotImplementedException(); - public bool Equals(Matrix3D value) => throw new NotImplementedException(); - public static bool operator ==(Matrix3D matrix1, Matrix3D matrix2) => throw new NotImplementedException(); - public static bool operator !=(Matrix3D matrix1, Matrix3D matrix2) => throw new NotImplementedException(); - public static Matrix3D operator *(Matrix3D matrix1, Matrix3D matrix2) => throw new NotImplementedException(); - public void Invert() => throw new NotImplementedException(); - } - } - } -} \ No newline at end of file diff --git a/shims/SystemRuntimeWindowsRuntimeXamlShim/SystemRuntimeWindowsRuntimeXamlShim.csproj b/shims/SystemRuntimeWindowsRuntimeXamlShim/SystemRuntimeWindowsRuntimeXamlShim.csproj deleted file mode 100644 index 4d7638a..0000000 --- a/shims/SystemRuntimeWindowsRuntimeXamlShim/SystemRuntimeWindowsRuntimeXamlShim.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netstandard2.0 - System.Runtime.WindowsRuntime.UI.Xaml - True - true - 4.0.0.0 - ../Snks/ECMA.snk - 00000000000000000400000000000000 - b77a5c561934e089 - false - - -