Remove ThrowHelper APIs in D2D1 projects, switch to new extensions

このコミットが含まれているのは:
Sergio Pedri committed 2023-02-25 18:51:51 +01:00
1 親 5a4fd9a4ce
コミット 92fbf75185
17ファイル変更
+87 -194

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

+13
ファイルの表示
@@ -20,6 +20,19 @@ internal static class ArgumentExceptionExtensions
throw new ArgumentException(null, parameterName);
}
/// <summary>
/// Throws an <see cref="ArgumentException"/> for a given parameter name and message.
/// </summary>
/// <param name="_">Dummy value to invoke the extension upon (always pass <see langword="null"/>.</param>
/// <param name="parameterName">The name of the parameter to report in the exception.</param>
/// <param name="message">The message to include in the exception.</param>
/// <exception cref="ArgumentException">Thrown with <paramref name="parameterName"/>.</exception>
[DoesNotReturn]
public static void Throw(this ArgumentException? _, string? parameterName, string? message)
{
throw new ArgumentException(message, parameterName);
}
/// <summary>
/// Throws an <see cref="ArgumentException"/> for a given parameter name.
/// </summary>