Add missing trailing dots to exception messages
このコミットが含まれているのは:
1 親
5fa036ac9b
コミット
2c3c428fc9
11ファイル変更
+26
-26
検索条件に一致するファイルはありません
@@ -74,7 +74,7 @@ public sealed partial class HlslBokehBlurProcessor : IImageProcessor
|
||||
{
|
||||
if (typeof(TPixel) != typeof(ImageSharpRgba32))
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("This processor only supports the RGBA32 pixel format");
|
||||
ThrowHelper.ThrowInvalidOperationException("This processor only supports the RGBA32 pixel format.");
|
||||
}
|
||||
|
||||
var processor = new Implementation(this, configuration, Unsafe.As<Image<ImageSharpRgba32>>(source), sourceRectangle);
|
||||
|
||||
@@ -265,7 +265,7 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
{
|
||||
if (!source.TryGetSinglePixelSpan(out Span<ImageSharpRgba32> pixelSpan))
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("Cannot process image frames wrapping discontiguous memory");
|
||||
ThrowHelper.ThrowInvalidOperationException("Cannot process image frames wrapping discontiguous memory.");
|
||||
}
|
||||
|
||||
Span<Rgba32> span = MemoryMarshal.Cast<ImageSharpRgba32, Rgba32>(pixelSpan);
|
||||
|
||||
@@ -78,7 +78,7 @@ public sealed partial class HlslGaussianBlurProcessor : IImageProcessor
|
||||
{
|
||||
if (typeof(TPixel) != typeof(ImageSharpRgba32))
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("This processor only supports the RGBA32 pixel format");
|
||||
ThrowHelper.ThrowInvalidOperationException("This processor only supports the RGBA32 pixel format.");
|
||||
}
|
||||
|
||||
var processor = new Implementation(this, configuration, Unsafe.As<Image<ImageSharpRgba32>>(source), sourceRectangle);
|
||||
|
||||
@@ -96,7 +96,7 @@ public sealed partial class HlslGaussianBlurProcessor
|
||||
{
|
||||
if (!source.TryGetSinglePixelSpan(out Span<ImageSharpRgba32> pixelSpan))
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("Cannot process image frames wrapping discontiguous memory");
|
||||
ThrowHelper.ThrowInvalidOperationException("Cannot process image frames wrapping discontiguous memory.");
|
||||
}
|
||||
|
||||
Span<Rgba32> span = MemoryMarshal.Cast<ImageSharpRgba32, Rgba32>(pixelSpan);
|
||||
|
||||
@@ -28,7 +28,7 @@ internal sealed unsafe partial class ShaderCompiler
|
||||
{
|
||||
Architecture.X64 => "win-x64",
|
||||
Architecture.Arm64 => "win-arm64",
|
||||
_ => ThrowHelper.ThrowNotSupportedException<string>("Invalid process architecture")
|
||||
_ => ThrowHelper.ThrowNotSupportedException<string>("Invalid process architecture.")
|
||||
};
|
||||
|
||||
// Test whether the native libraries are present in the same folder of the executable
|
||||
|
||||
@@ -35,7 +35,7 @@ public sealed class UnsupportedTextureTypeException : NotSupportedException
|
||||
{
|
||||
2 => $"{nameof(GraphicsDevice.IsReadOnlyTexture2DSupportedForType)}<T>() or {nameof(GraphicsDevice)}.{nameof(GraphicsDevice.IsReadWriteTexture2DSupportedForType)}<T>().",
|
||||
3 => $"{nameof(GraphicsDevice.IsReadOnlyTexture3DSupportedForType)}<T>() or {nameof(GraphicsDevice)}.{nameof(GraphicsDevice.IsReadWriteTexture3DSupportedForType)}<T>().",
|
||||
_ => ThrowHelper.ThrowArgumentException<string>("Invalid texture rank")
|
||||
_ => ThrowHelper.ThrowArgumentException<string>("Invalid texture rank.")
|
||||
});
|
||||
|
||||
builder.Append("As a possible workaround on older devices, consider using a texture type of lower rank, or a linear buffer.");
|
||||
|
||||
@@ -44,7 +44,7 @@ internal static class HResultExtensions
|
||||
|
||||
if (hasErrorsOrWarnings)
|
||||
{
|
||||
ThrowHelper.ThrowWin32Exception("Warning or error detected by ID3D12InfoQueue");
|
||||
ThrowHelper.ThrowWin32Exception("Warning or error detected by ID3D12InfoQueue.");
|
||||
}
|
||||
#else
|
||||
if (result < 0)
|
||||
|
||||
@@ -43,7 +43,7 @@ internal static class DXGIFormatHelper
|
||||
else if (typeof(T) == typeof(R16)) return DXGI_FORMAT_R16_UNORM;
|
||||
else if (typeof(T) == typeof(Rg16)) return DXGI_FORMAT_R8G8_UNORM;
|
||||
else if (typeof(T) == typeof(Rg32)) return DXGI_FORMAT_R16G16_UNORM;
|
||||
else return ThrowHelper.ThrowArgumentException<DXGI_FORMAT>("Invalid texture type");
|
||||
else return ThrowHelper.ThrowArgumentException<DXGI_FORMAT>("Invalid texture type.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -86,7 +86,7 @@ internal static class DXGIFormatHelper
|
||||
return true;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<bool>("Invalid texture type");
|
||||
return ThrowHelper.ThrowArgumentException<bool>("Invalid texture type.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -30,7 +30,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) return GUID.GUID_WICPixelFormat64bppRGBA;
|
||||
else if (typeof(T) == typeof(R8)) return GUID.GUID_WICPixelFormat8bppGray;
|
||||
else if (typeof(T) == typeof(R16)) return GUID.GUID_WICPixelFormat16bppGray;
|
||||
else return ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else return ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatPng)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat8bppGray;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatJpeg)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat8bppGray;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatWmp)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = default;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatTiff)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = default;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatDds)
|
||||
{
|
||||
@@ -95,11 +95,11 @@ internal static class WICFormatHelper
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type.");
|
||||
}
|
||||
else
|
||||
{
|
||||
intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid container format");
|
||||
intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid container format.");
|
||||
}
|
||||
|
||||
return intermediateFormat != default;
|
||||
@@ -125,7 +125,7 @@ internal static class WICFormatHelper
|
||||
".wmp" => GUID.GUID_ContainerFormatWmp,
|
||||
".tiff" => GUID.GUID_ContainerFormatTiff,
|
||||
".dds" => GUID.GUID_ContainerFormatDds,
|
||||
_ => ThrowHelper.ThrowArgumentException<Guid>("Invalid filename"),
|
||||
_ => ThrowHelper.ThrowArgumentException<Guid>("Invalid filename."),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ internal static class WICFormatHelper
|
||||
ImageFormat.Wmp => GUID.GUID_ContainerFormatWmp,
|
||||
ImageFormat.Tiff => GUID.GUID_ContainerFormatTiff,
|
||||
ImageFormat.Dds => GUID.GUID_ContainerFormatDds,
|
||||
_ => ThrowHelper.ThrowArgumentException<Guid>("Invalid format"),
|
||||
_ => ThrowHelper.ThrowArgumentException<Guid>("Invalid format."),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -157,7 +157,7 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -180,7 +180,7 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -245,7 +245,7 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -268,7 +268,7 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -291,6 +291,6 @@ public static class GraphicsResourceHelper
|
||||
return *(ulong*)&d3D12GpuDescriptorHandle;
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance");
|
||||
return ThrowHelper.ThrowArgumentException<ulong>("The input texture is not a valid instance.");
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public static class DeviceExtensions
|
||||
{
|
||||
Device.Discrete => GraphicsDevice.QueryDevices(info => info.IsHardwareAccelerated).FirstOrDefault(),
|
||||
Device.Warp => GraphicsDevice.QueryDevices(info => !info.IsHardwareAccelerated).First(),
|
||||
_ => ThrowHelper.ThrowArgumentException<GraphicsDevice>("Invalid device")
|
||||
_ => ThrowHelper.ThrowArgumentException<GraphicsDevice>("Invalid device.")
|
||||
};
|
||||
|
||||
if (device is null)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする