aboutsummaryrefslogtreecommitdiff
path: root/lib/Plugins.Essentials
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-01-13 22:42:13 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-01-13 22:42:13 -0500
commit299c41bf07d22daf7a6707bf2d485193c0ef61b8 (patch)
treec77740a12e74689ed637bf177c3cc78aa0672e92 /lib/Plugins.Essentials
parentddead3ab60254fcc1c8029715e094480da51dcd0 (diff)
using new exception api
Diffstat (limited to 'lib/Plugins.Essentials')
-rw-r--r--lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs b/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs
index 74d23f7..2d41e4c 100644
--- a/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs
+++ b/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs
@@ -71,21 +71,21 @@ namespace VNLib.Plugins.Essentials.Extensions
///<inheritdoc/>
public void ExpireCookie(IHttpEvent entity, bool force)
{
- _ = entity ?? throw new ArgumentNullException(nameof(entity));
+ ArgumentNullException.ThrowIfNull(entity);
SetCookieInternal(entity, string.Empty, force);
}
///<inheritdoc/>
public string? GetCookie(IHttpEvent entity)
{
- _ = entity ?? throw new ArgumentNullException(nameof(entity));
+ ArgumentNullException.ThrowIfNull(entity);
return entity.Server.RequestCookies.GetValueOrDefault(Name);
}
///<inheritdoc/>
public void SetCookie(IHttpEvent entity, string value)
{
- _ = entity ?? throw new ArgumentNullException(nameof(entity));
+ ArgumentNullException.ThrowIfNull(entity);
SetCookieInternal(entity, value, true);
}