diff options
author | vnugent <public@vaughnnugent.com> | 2024-01-13 22:42:13 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-01-13 22:42:13 -0500 |
commit | 299c41bf07d22daf7a6707bf2d485193c0ef61b8 (patch) | |
tree | c77740a12e74689ed637bf177c3cc78aa0672e92 /lib/Plugins.Essentials/src/Extensions | |
parent | ddead3ab60254fcc1c8029715e094480da51dcd0 (diff) |
using new exception api
Diffstat (limited to 'lib/Plugins.Essentials/src/Extensions')
-rw-r--r-- | lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs | 6 |
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); } |