diff --git a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs
index 2e92d458..1f0291b3 100644
--- a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs
+++ b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs
@@ -32,7 +32,7 @@ public sealed class MainViewModel : ObservableObject
///
public MainViewModel(IAnalyticsService analyticsService)
{
- Guard.IsNotNull(analyticsService, nameof(analyticsService));
+ Guard.IsNotNull(analyticsService);
this.analyticsService = analyticsService;
this.isVerticalSyncEnabled = true;
diff --git a/samples/ComputeSharp.SwapChain.Uwp/Extensions/AssemblyExtensions.cs b/samples/ComputeSharp.SwapChain.Uwp/Extensions/AssemblyExtensions.cs
index cd39cfda..52587761 100644
--- a/samples/ComputeSharp.SwapChain.Uwp/Extensions/AssemblyExtensions.cs
+++ b/samples/ComputeSharp.SwapChain.Uwp/Extensions/AssemblyExtensions.cs
@@ -20,8 +20,8 @@ public static class AssemblyExtensions
/// The contents of the specified file.
public static bool TryReadAllTextFromManifestFile(this Assembly assembly, string filename, out string? text)
{
- Guard.IsNotNull(assembly, nameof(assembly));
- Guard.IsNotNull(filename, nameof(filename));
+ Guard.IsNotNull(assembly);
+ Guard.IsNotNull(filename);
try
{
diff --git a/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs b/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs
index 2d1c39aa..3ffca6a7 100644
--- a/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs
+++ b/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs
@@ -29,7 +29,7 @@ partial class SwapChainManager
{
ThrowIfDisposed();
- Guard.IsNotNull(shaderRunner, nameof(shaderRunner));
+ Guard.IsNotNull(shaderRunner);
using (await this.setupSemaphore.LockAsync())
{
diff --git a/src/ComputeSharp.UI/ShaderRunner{T}.cs b/src/ComputeSharp.UI/ShaderRunner{T}.cs
index 4d3af1cd..da2d5fed 100644
--- a/src/ComputeSharp.UI/ShaderRunner{T}.cs
+++ b/src/ComputeSharp.UI/ShaderRunner{T}.cs
@@ -40,7 +40,7 @@ public sealed class ShaderRunner : IShaderRunner
/// The instance used to create shaders to run.
public ShaderRunner(Func shaderFactory)
{
- Guard.IsNotNull(shaderFactory, nameof(shaderFactory));
+ Guard.IsNotNull(shaderFactory);
this.shaderFactory = shaderFactory;
}
@@ -51,7 +51,7 @@ public sealed class ShaderRunner : IShaderRunner
/// The instance used to create shaders to run.
public ShaderRunner(Func shaderFactory)
{
- Guard.IsNotNull(shaderFactory, nameof(shaderFactory));
+ Guard.IsNotNull(shaderFactory);
this.statefulShaderFactory = shaderFactory;
}
diff --git a/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs b/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs
index f6815dee..6045ba1e 100644
--- a/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs
@@ -22,7 +22,7 @@ public static class BufferExtensions
public static T[] ToArray(this Buffer source)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(source);
return source.ToArray(0, source.Length);
}
@@ -38,8 +38,8 @@ public static class BufferExtensions
public static T[] ToArray(this Buffer source, int offset, int count)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
- Guard.IsGreaterThanOrEqualTo(count, 0, nameof(count));
+ Guard.IsNotNull(source);
+ Guard.IsGreaterThanOrEqualTo(count, 0);
T[] data = GC.AllocateUninitializedArray(count);
@@ -57,8 +57,8 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, T[] destination)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(source);
+ Guard.IsNotNull(destination);
source.CopyTo(destination.AsSpan(), 0);
}
@@ -75,8 +75,8 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, T[] destination, int sourceOffset, int destinationOffset, int count)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(source);
+ Guard.IsNotNull(destination);
Span span = destination.AsSpan(destinationOffset, count);
@@ -92,7 +92,7 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, Span destination)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(source);
source.CopyTo(destination, 0);
}
@@ -107,7 +107,7 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, Span destination, int sourceOffset)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(source);
source.CopyTo(ref MemoryMarshal.GetReference(destination), sourceOffset, destination.Length);
}
@@ -121,8 +121,8 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, Buffer destination)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(source);
+ Guard.IsNotNull(destination);
source.CopyTo(destination, 0, 0, source.Length);
}
@@ -139,8 +139,8 @@ public static class BufferExtensions
public static void CopyTo(this Buffer source, Buffer destination, int sourceOffset, int destinationOffset, int count)
where T : unmanaged
{
- Guard.IsNotNull(source, nameof(source));
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(source);
+ Guard.IsNotNull(destination);
source.CopyTo(destination, sourceOffset, destinationOffset, count);
}
@@ -154,8 +154,8 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, T[] source)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
destination.CopyFrom(source.AsSpan(), 0);
}
@@ -172,8 +172,8 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, T[] source, int sourceOffset, int destinationOffset, int count)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
ReadOnlySpan span = source.AsSpan(sourceOffset, count);
@@ -189,7 +189,7 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, ReadOnlySpan source)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(destination);
destination.CopyFrom(source, 0);
}
@@ -204,7 +204,7 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, ReadOnlySpan source, int destinationOffset)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
+ Guard.IsNotNull(destination);
destination.CopyFrom(ref MemoryMarshal.GetReference(source), destinationOffset, source.Length);
}
@@ -218,8 +218,8 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, Buffer source)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, 0, 0, source.Length);
}
@@ -236,8 +236,8 @@ public static class BufferExtensions
public static void CopyFrom(this Buffer destination, Buffer source, int sourceOffset, int destinationOffset, int count)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, sourceOffset, destinationOffset, count);
}
diff --git a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Dispatching.cs b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Dispatching.cs
index adc2f244..393fe304 100644
--- a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Dispatching.cs
+++ b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Dispatching.cs
@@ -18,7 +18,7 @@ public static partial class GraphicsDeviceExtensions
public static void For(this GraphicsDevice device, int x, in T shader)
where T : struct, IComputeShader
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using ComputeContext context = device.CreateComputeContext();
@@ -36,7 +36,7 @@ public static partial class GraphicsDeviceExtensions
public static void For(this GraphicsDevice device, int x, int y, in T shader)
where T : struct, IComputeShader
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using ComputeContext context = device.CreateComputeContext();
@@ -55,7 +55,7 @@ public static partial class GraphicsDeviceExtensions
public static void For(this GraphicsDevice device, int x, int y, int z, in T shader)
where T : struct, IComputeShader
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using ComputeContext context = device.CreateComputeContext();
@@ -77,7 +77,7 @@ public static partial class GraphicsDeviceExtensions
public static void For(this GraphicsDevice device, int x, int y, int z, int threadsX, int threadsY, int threadsZ, in T shader)
where T : struct, IComputeShader
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using ComputeContext context = device.CreateComputeContext();
@@ -95,8 +95,8 @@ public static partial class GraphicsDeviceExtensions
where T : struct, IPixelShader
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(texture, nameof(texture));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(texture);
using ComputeContext context = device.CreateComputeContext();
@@ -115,8 +115,8 @@ public static partial class GraphicsDeviceExtensions
where T : struct, IPixelShader
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(texture, nameof(texture));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(texture);
using ComputeContext context = device.CreateComputeContext();
@@ -148,7 +148,7 @@ public static partial class GraphicsDeviceExtensions
///
public static ComputeContext CreateComputeContext(this GraphicsDevice device)
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
device.ThrowIfDisposed();
diff --git a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
index 41191701..e1c65de6 100644
--- a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
+++ b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
@@ -20,7 +20,7 @@ public static partial class GraphicsDeviceExtensions
public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, int length, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, length, allocationMode);
}
@@ -35,8 +35,8 @@ public static partial class GraphicsDeviceExtensions
public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, T[] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateConstantBuffer(source.AsSpan());
}
@@ -51,7 +51,7 @@ public static partial class GraphicsDeviceExtensions
public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, ReadOnlySpan source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ConstantBuffer buffer = new(device, source.Length, AllocationMode.Default);
@@ -70,8 +70,8 @@ public static partial class GraphicsDeviceExtensions
public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, Buffer source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ConstantBuffer constantBuffer = new(device, source.Length, AllocationMode.Default);
@@ -91,7 +91,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, int length, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, length, allocationMode);
}
@@ -106,8 +106,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, T[] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyBuffer(source.AsSpan());
}
@@ -122,7 +122,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, ReadOnlySpan source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadOnlyBuffer buffer = new(device, source.Length, AllocationMode.Default);
@@ -141,8 +141,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, Buffer source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadOnlyBuffer readWriteBuffer = new(device, source.Length, AllocationMode.Default);
@@ -163,7 +163,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, int width, int height, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -180,8 +180,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, T[] source, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture2D(source.AsSpan(), width, height);
}
@@ -199,8 +199,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, T[] source, int offset, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture2D(source.AsSpan(offset), width, height);
}
@@ -215,8 +215,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, T[,] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadOnlyTexture2D texture = new(device, source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -237,7 +237,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, ReadOnlySpan source, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadOnlyTexture2D texture = new(device, width, height, AllocationMode.Default);
@@ -260,7 +260,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -279,8 +279,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture2D(source.AsSpan(), width, height);
}
@@ -300,8 +300,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture2D(source.AsSpan(offset), width, height);
}
@@ -318,8 +318,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadOnlyTexture2D texture = new(device, source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -342,7 +342,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadOnlyTexture2D texture = new(device, width, height, AllocationMode.Default);
@@ -364,7 +364,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture3D AllocateReadOnlyTexture3D(this GraphicsDevice device, int width, int height, int depth, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -382,8 +382,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture3D AllocateReadOnlyTexture3D(this GraphicsDevice device, T[] source, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture3D(source.AsSpan(), width, height, depth);
}
@@ -402,8 +402,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture3D AllocateReadOnlyTexture3D(this GraphicsDevice device, T[] source, int offset, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture3D(source.AsSpan(offset), width, height, depth);
}
@@ -422,8 +422,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture3D AllocateReadOnlyTexture3D(this GraphicsDevice device, T[,,] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadOnlyTexture3D texture = new(device, source.GetLength(2), source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -445,7 +445,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadOnlyTexture3D AllocateReadOnlyTexture3D(this GraphicsDevice device, ReadOnlySpan source, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadOnlyTexture3D texture = new(device, width, height, depth, AllocationMode.Default);
@@ -469,7 +469,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -489,8 +489,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture3D(source.AsSpan(), width, height, depth);
}
@@ -511,8 +511,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadOnlyTexture3D(source.AsSpan(offset), width, height, depth);
}
@@ -533,8 +533,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadOnlyTexture3D texture = new(device, source.GetLength(2), source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -558,7 +558,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadOnlyTexture3D texture = new(device, width, height, depth, AllocationMode.Default);
@@ -578,7 +578,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, int length, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, length, allocationMode);
}
@@ -593,8 +593,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, T[] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteBuffer(source.AsSpan());
}
@@ -609,7 +609,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, ReadOnlySpan source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadWriteBuffer buffer = new(device, source.Length, AllocationMode.Default);
@@ -628,8 +628,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, Buffer source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadWriteBuffer readWriteBuffer = new(device, source.Length, AllocationMode.Default);
@@ -650,7 +650,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, int width, int height, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -667,8 +667,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, T[] source, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture2D(source.AsSpan(), width, height);
}
@@ -686,8 +686,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, T[] source, int offset, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture2D(source.AsSpan(offset), width, height);
}
@@ -702,8 +702,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, T[,] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadWriteTexture2D texture = new(device, source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -724,7 +724,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, ReadOnlySpan source, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadWriteTexture2D texture = new(device, width, height, AllocationMode.Default);
@@ -747,7 +747,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -766,8 +766,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture2D(source.AsSpan(), width, height);
}
@@ -787,8 +787,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture2D(source.AsSpan(offset), width, height);
}
@@ -805,8 +805,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadWriteTexture2D texture = new(device, source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -829,7 +829,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadWriteTexture2D texture = new(device, width, height, AllocationMode.Default);
@@ -851,7 +851,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture3D AllocateReadWriteTexture3D(this GraphicsDevice device, int width, int height, int depth, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -869,8 +869,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture3D AllocateReadWriteTexture3D(this GraphicsDevice device, T[] source, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture3D(source.AsSpan(), width, height, depth);
}
@@ -889,8 +889,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture3D AllocateReadWriteTexture3D(this GraphicsDevice device, T[] source, int offset, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture3D(source.AsSpan(offset), width, height, depth);
}
@@ -909,8 +909,8 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture3D AllocateReadWriteTexture3D(this GraphicsDevice device, T[,,] source)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadWriteTexture3D texture = new(device, source.GetLength(2), source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -932,7 +932,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadWriteTexture3D AllocateReadWriteTexture3D(this GraphicsDevice device, ReadOnlySpan source, int width, int height, int depth)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadWriteTexture3D texture = new(device, width, height, depth, AllocationMode.Default);
@@ -956,7 +956,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -976,8 +976,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture3D(source.AsSpan(), width, height, depth);
}
@@ -998,8 +998,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
return device.AllocateReadWriteTexture3D(source.AsSpan(offset), width, height, depth);
}
@@ -1020,8 +1020,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(source);
ReadWriteTexture3D texture = new(device, source.GetLength(2), source.GetLength(1), source.GetLength(0), AllocationMode.Default);
@@ -1045,7 +1045,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
ReadWriteTexture3D texture = new(device, width, height, depth, AllocationMode.Default);
@@ -1065,7 +1065,7 @@ public static partial class GraphicsDeviceExtensions
public static UploadBuffer AllocateUploadBuffer(this GraphicsDevice device, int length, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, length, allocationMode);
}
@@ -1082,7 +1082,7 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture2D AllocateUploadTexture2D(this GraphicsDevice device, int width, int height, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -1100,7 +1100,7 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture3D AllocateUploadTexture3D(this GraphicsDevice device, int width, int height, int depth, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -1116,7 +1116,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadBackBuffer AllocateReadBackBuffer(this GraphicsDevice device, int length, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, length, allocationMode);
}
@@ -1133,7 +1133,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadBackTexture2D AllocateReadBackTexture2D(this GraphicsDevice device, int width, int height, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, allocationMode);
}
@@ -1151,7 +1151,7 @@ public static partial class GraphicsDeviceExtensions
public static ReadBackTexture3D AllocateReadBackTexture3D(this GraphicsDevice device, int width, int height, int depth, AllocationMode allocationMode = AllocationMode.Default)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return new(device, width, height, depth, allocationMode);
}
@@ -1168,8 +1168,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(filename, nameof(filename));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(filename);
return device.LoadReadOnlyTexture2D(filename.AsSpan());
}
@@ -1186,7 +1186,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, filename);
@@ -1209,7 +1209,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, span);
@@ -1232,8 +1232,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(stream, nameof(stream));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(stream);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, stream);
@@ -1256,8 +1256,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(filename, nameof(filename));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(filename);
return device.LoadReadWriteTexture2D(filename.AsSpan());
}
@@ -1274,7 +1274,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, filename);
@@ -1297,7 +1297,7 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, span);
@@ -1320,8 +1320,8 @@ public static partial class GraphicsDeviceExtensions
where T : unmanaged, IPixel
where TPixel : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(stream, nameof(stream));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(stream);
using UploadTexture2D upload = WICHelper.Instance.LoadTexture(device, stream);
@@ -1342,8 +1342,8 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, string filename)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(filename, nameof(filename));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(filename);
return device.LoadUploadTexture2D(filename.AsSpan());
}
@@ -1358,7 +1358,7 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, ReadOnlySpan filename)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return WICHelper.Instance.LoadTexture(device, filename);
}
@@ -1373,7 +1373,7 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, ReadOnlySpan span)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
+ Guard.IsNotNull(device);
return WICHelper.Instance.LoadTexture(device, span);
}
@@ -1388,8 +1388,8 @@ public static partial class GraphicsDeviceExtensions
public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, Stream stream)
where T : unmanaged
{
- Guard.IsNotNull(device, nameof(device));
- Guard.IsNotNull(stream, nameof(stream));
+ Guard.IsNotNull(device);
+ Guard.IsNotNull(stream);
return WICHelper.Instance.LoadTexture(device, stream);
}
diff --git a/src/ComputeSharp/Graphics/Extensions/ReadBackBufferExtensions.cs b/src/ComputeSharp/Graphics/Extensions/ReadBackBufferExtensions.cs
index 84a4feed..0940cf5d 100644
--- a/src/ComputeSharp/Graphics/Extensions/ReadBackBufferExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/ReadBackBufferExtensions.cs
@@ -17,8 +17,8 @@ public static class ReadBackBufferExtensions
public static void CopyFrom(this ReadBackBuffer destination, StructuredBuffer source)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, 0, 0, source.Length);
}
@@ -35,8 +35,8 @@ public static class ReadBackBufferExtensions
public static void CopyFrom(this ReadBackBuffer destination, StructuredBuffer source, int sourceOffset, int destinationOffset, int count)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, sourceOffset, destinationOffset, count);
}
diff --git a/src/ComputeSharp/Graphics/Extensions/ReadBackTexture2DExtensions.cs b/src/ComputeSharp/Graphics/Extensions/ReadBackTexture2DExtensions.cs
index 92a56aaa..1d54bc19 100644
--- a/src/ComputeSharp/Graphics/Extensions/ReadBackTexture2DExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/ReadBackTexture2DExtensions.cs
@@ -21,8 +21,8 @@ public static class ReadBackTexture2DExtensions
public static void CopyFrom(this ReadBackTexture2D destination, Texture2D source)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, 0, 0, 0, 0, source.Width, source.Height);
}
@@ -40,8 +40,8 @@ public static class ReadBackTexture2DExtensions
public static void CopyFrom(this ReadBackTexture2D destination, Texture2D source, int sourceOffsetX, int sourceOffsetY, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, sourceOffsetX, sourceOffsetY, 0, 0, width, height);
}
@@ -61,8 +61,8 @@ public static class ReadBackTexture2DExtensions
public static void CopyFrom(this ReadBackTexture2D destination, Texture2D source, int sourceOffsetX, int sourceOffsetY, int destinationOffsetX, int destinationOffsetY, int width, int height)
where T : unmanaged
{
- Guard.IsNotNull(destination, nameof(destination));
- Guard.IsNotNull(source, nameof(source));
+ Guard.IsNotNull(destination);
+ Guard.IsNotNull(source);
source.CopyTo(destination, sourceOffsetX, sourceOffsetY, destinationOffsetX, destinationOffsetY, width, height);
}
@@ -76,8 +76,8 @@ public static class ReadBackTexture2DExtensions
public static void Save(this ReadBackTexture2D texture, string filename)
where T : unmanaged
{
- Guard.IsNotNull(texture, nameof(texture));
- Guard.IsNotNull(filename, nameof(filename));
+ Guard.IsNotNull(texture);
+ Guard.IsNotNull(filename);
WICHelper.Instance.SaveTexture(texture.View, filename.AsSpan());
}
@@ -91,7 +91,7 @@ public static class ReadBackTexture2DExtensions
public static void Save(this ReadBackTexture2D texture, ReadOnlySpan filename)
where T : unmanaged
{
- Guard.IsNotNull(texture, nameof(texture));
+ Guard.IsNotNull(texture);
WICHelper.Instance.SaveTexture(texture.View, filename);
}
@@ -106,8 +106,8 @@ public static class ReadBackTexture2DExtensions
public static void Save(this ReadBackTexture2D