Guard
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Polly.Utils
{
[ExcludeFromCodeCoverage]
internal static class Guard
{
[NullableContext(1)]
public static T NotNull<T>(T value, [CallerArgumentExpression("value")] string argumentName = "") where T : class
{
ArgumentNullException.ThrowIfNull(value, argumentName);
return value;
}
}
}