We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify
[CallerArgumentExpression]
Removes boilerplate code by instructing the compiler to automatically pass argument expressions to the check function.
Improves quality of exception messages.
[MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void NotNull([NotNull] object? obj, [CallerArgumentExpression(nameof(obj))] string? paramName = null) { #if NET ArgumentNullException.ThrowIfNull(obj, paramName); #else if (obj is null) { throw new ArgumentNullException(paramName); } #endif }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Proposal
Verify
class that makes use of modern features like e.g. the[CallerArgumentExpression]
attribute.Intention
Removes boilerplate code by instructing the compiler to automatically pass argument expressions to the check function.
Improves quality of exception messages.
Example
The text was updated successfully, but these errors were encountered: