Added ThrowHelper type

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-20 11:46:19 +01:00
1 親 0c3f8f92c3
コミット 3d48a6fb0c
11ファイル変更
+125 -27

検索条件に一致するファイルはありません

+2 -6
ファイルの表示
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using ComputeSharp.Core.Helpers;
using TerraFX.Interop;
using FX = TerraFX.Interop.Windows;
using HRESULT = System.Int32;
@@ -40,12 +41,7 @@ namespace ComputeSharp.Graphics.Helpers
return new GraphicsDevice(d3d12device.Move(), &dxgiDescription1);
}
static GraphicsDevice Throw()
{
throw new NotSupportedException("There isn't a supported GPU device on the current machine");
}
return Throw();
return ThrowHelper.ThrowNotSupportedException<GraphicsDevice>("There isn't a supported GPU device on the current machine");
}
/// <summary>