From b9fdbc7a070f00cda4c1a5e37988a9ea5e1b4238 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 10 Dec 2020 18:11:58 +0100 Subject: [PATCH] Removed CSWinRT dependency --- .../ComputeSharp.Benchmark.csproj | 2 +- .../ComputeSharp.ImageProcessing.csproj | 2 +- .../ComputeSharp.Sample.csproj | 2 +- .../ComputeSharp.Graphics.csproj | 2 +- .../ComputeSharp.Shaders.csproj | 2 +- src/ComputeSharp/ComputeSharp.csproj | 2 +- .../Windows.Foundation/PointExtensions.cs | 30 ----------------- .../Windows.Foundation/RectExtensions.cs | 32 ------------------- .../Windows.Foundation/SizeExtensions.cs | 32 ------------------- 9 files changed, 6 insertions(+), 100 deletions(-) delete mode 100644 src/ComputeSharp/Extensions/Windows.Foundation/PointExtensions.cs delete mode 100644 src/ComputeSharp/Extensions/Windows.Foundation/RectExtensions.cs delete mode 100644 src/ComputeSharp/Extensions/Windows.Foundation/SizeExtensions.cs diff --git a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj index 8835dac9..99d0ea05 100644 --- a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj +++ b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net5.0-windows10.0.19041.0 + net5.0 diff --git a/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj b/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj index b7d2e6a1..422f73dd 100644 --- a/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj +++ b/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj @@ -2,7 +2,7 @@ Exe - net5.0-windows10.0.19041.0 + net5.0 diff --git a/samples/ComputeSharp.Sample/ComputeSharp.Sample.csproj b/samples/ComputeSharp.Sample/ComputeSharp.Sample.csproj index ff930af1..fb05ec61 100644 --- a/samples/ComputeSharp.Sample/ComputeSharp.Sample.csproj +++ b/samples/ComputeSharp.Sample/ComputeSharp.Sample.csproj @@ -2,7 +2,7 @@ Exe - net5.0-windows10.0.19041.0 + net5.0 diff --git a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj index 1344fb2b..e98b35cd 100644 --- a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj +++ b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj @@ -1,7 +1,7 @@  - net5.0-windows10.0.19041.0 + net5.0 enable true diff --git a/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj b/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj index 6221de2e..a085e449 100644 --- a/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj +++ b/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj @@ -1,7 +1,7 @@  - net5.0-windows10.0.19041.0 + net5.0 enable true diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index a4aa8e9e..54bca4f1 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -1,7 +1,7 @@  - net5.0-windows10.0.19041.0 + net5.0 preview enable true diff --git a/src/ComputeSharp/Extensions/Windows.Foundation/PointExtensions.cs b/src/ComputeSharp/Extensions/Windows.Foundation/PointExtensions.cs deleted file mode 100644 index ab758f0a..00000000 --- a/src/ComputeSharp/Extensions/Windows.Foundation/PointExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Diagnostics.Contracts; -using System.Numerics; -using System.Runtime.CompilerServices; - -namespace Windows.Foundation -{ - /// - /// A with some extension methods for the type. - /// - public static class PointExtensions - { - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 ToVector2(this Point value) => new((float)value.X, (float)value.Y); - - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Point ToPoint(this Vector2 value) => new(value.X, value.Y); - } -} diff --git a/src/ComputeSharp/Extensions/Windows.Foundation/RectExtensions.cs b/src/ComputeSharp/Extensions/Windows.Foundation/RectExtensions.cs deleted file mode 100644 index 29d85dec..00000000 --- a/src/ComputeSharp/Extensions/Windows.Foundation/RectExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Diagnostics.Contracts; -using System.Numerics; -using System.Runtime.CompilerServices; - -namespace Windows.Foundation -{ - /// - /// A with some extension methods for the type. - /// - public static class RectExtensions - { - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - /// The input is read in the following order: , , , . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 ToVector2(this Rect value) => new((float)value.Left, (float)value.Top, (float)value.Right, (float)value.Bottom); - - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - /// The input is assigned in the following order: , , , . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Rect ToPoint(this Vector4 value) => new(value.X, value.Y, value.Z, value.W); - } -} \ No newline at end of file diff --git a/src/ComputeSharp/Extensions/Windows.Foundation/SizeExtensions.cs b/src/ComputeSharp/Extensions/Windows.Foundation/SizeExtensions.cs deleted file mode 100644 index 4a06ef72..00000000 --- a/src/ComputeSharp/Extensions/Windows.Foundation/SizeExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Diagnostics.Contracts; -using System.Numerics; -using System.Runtime.CompilerServices; - -namespace Windows.Foundation -{ - /// - /// A with some extension methods for the type. - /// - public static class SizeExtensions - { - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - /// The input is read in the following order: , . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 ToVector2(this Size value) => new((float)value.Width, (float)value.Height); - - /// - /// Converts a value to a . - /// - /// The input to convert. - /// A value representing the input . - /// The input is assigned in the following order: , . - [Pure] - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Size ToPoint(this Vector2 value) => new(value.X, value.Y); - } -} \ No newline at end of file