Made ContainsJsonProp approach consistent with GetByJsonProp

This commit is contained in:
Chomp
2025-03-08 10:27:14 +00:00
parent 204f9e4525
commit d9cf496950
@@ -32,10 +32,8 @@ public static class ObjectExtensions
/// <exception cref="ArgumentNullException"></exception>
public static bool ContainsJsonProp<T>(this object? obj, T key)
{
if (obj == null)
{
throw new ArgumentNullException(nameof(obj));
}
ArgumentNullException.ThrowIfNull(obj);
ArgumentNullException.ThrowIfNull(key);
return TryGetCachedProperty(obj.GetType(), key.ToString(), out _);
}