From 2cd2f1ad0c21e6e414953a344fab245e80fc82bd Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 26 Aug 2019 14:07:41 +0200 Subject: [PATCH] Fixed namespaces and internals visibility --- .../Properties/AssemblyInfo.cs | 5 +++++ .../Buffers/ConstantBuffer{T}.cs | 2 +- .../Buffers/ReadOnlyBuffer{T}.cs | 4 ++-- .../Buffers/ReadWriteBuffer{T}.cs | 4 ++-- .../ComputeSharp.Graphics.csproj | 4 ++++ .../InvalidExecutionContextException.cs | 17 ----------------- 6 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 src/ComputeSharp.Core/Properties/AssemblyInfo.cs delete mode 100644 src/ComputeSharp.Graphics/Exceptions/InvalidExecutionContextException.cs diff --git a/src/ComputeSharp.Core/Properties/AssemblyInfo.cs b/src/ComputeSharp.Core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..307969fc --- /dev/null +++ b/src/ComputeSharp.Core/Properties/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("ComputeSharp")] +[assembly: InternalsVisibleTo("ComputeSharp.Graphics")] +[assembly: InternalsVisibleTo("ComputeSharp.Shaders")] diff --git a/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs index 492a979d..fece872f 100644 --- a/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/ConstantBuffer{T}.cs @@ -2,9 +2,9 @@ using System.Buffers; using System.Diagnostics.Contracts; using System.Runtime.CompilerServices; +using ComputeSharp.Exceptions; using ComputeSharp.Graphics.Buffers.Abstract; using ComputeSharp.Graphics.Buffers.Enums; -using ComputeSharp.Graphics.Exceptions; using ComputeSharp.Graphics.Helpers; using SharpDX.Direct3D12; using CommandList = ComputeSharp.Graphics.Commands.CommandList; diff --git a/src/ComputeSharp.Graphics/Buffers/ReadOnlyBuffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/ReadOnlyBuffer{T}.cs index 72eb933b..04dfd77e 100644 --- a/src/ComputeSharp.Graphics/Buffers/ReadOnlyBuffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/ReadOnlyBuffer{T}.cs @@ -1,6 +1,6 @@ -using ComputeSharp.Graphics.Buffers.Abstract; +using ComputeSharp.Exceptions; +using ComputeSharp.Graphics.Buffers.Abstract; using ComputeSharp.Graphics.Buffers.Enums; -using ComputeSharp.Graphics.Exceptions; namespace ComputeSharp.Graphics.Buffers { diff --git a/src/ComputeSharp.Graphics/Buffers/ReadWriteBuffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/ReadWriteBuffer{T}.cs index 20cc988a..16b9e783 100644 --- a/src/ComputeSharp.Graphics/Buffers/ReadWriteBuffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/ReadWriteBuffer{T}.cs @@ -1,6 +1,6 @@ -using ComputeSharp.Graphics.Buffers.Abstract; +using ComputeSharp.Exceptions; +using ComputeSharp.Graphics.Buffers.Abstract; using ComputeSharp.Graphics.Buffers.Enums; -using ComputeSharp.Graphics.Exceptions; namespace ComputeSharp.Graphics.Buffers { diff --git a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj index a2f6a000..6452507c 100644 --- a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj +++ b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj @@ -12,4 +12,8 @@ + + + + diff --git a/src/ComputeSharp.Graphics/Exceptions/InvalidExecutionContextException.cs b/src/ComputeSharp.Graphics/Exceptions/InvalidExecutionContextException.cs deleted file mode 100644 index 571ff044..00000000 --- a/src/ComputeSharp.Graphics/Exceptions/InvalidExecutionContextException.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Runtime.CompilerServices; - -namespace ComputeSharp.Graphics.Exceptions -{ - /// - /// A custom that indicates when an HLSL-only API is called from C# - /// - public sealed class InvalidExecutionContextException : InvalidOperationException - { - /// - /// Creates a new instance - /// - /// The name of the caller API - internal InvalidExecutionContextException(string name) : base($"The API {name} can only be used from within an HLSL shader") { } - } -}