Skip to content

Commit 0445f82

Browse files
Copilotjmprieur
andcommitted
Use ArgumentNullException.ThrowIfNull for NET8.0_OR_GREATER
Co-authored-by: jmprieur <[email protected]>
1 parent eec449e commit 0445f82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Microsoft.Identity.Abstractions/DownstreamApi/AuthorizationHeaderResult.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,14 @@ public AuthorizationHeaderResult(AuthorizationHeaderInformation? info, Authoriza
104104
/// </remarks>
105105
public static implicit operator string(AuthorizationHeaderResult result)
106106
{
107+
#if NET8_0_OR_GREATER
108+
ArgumentNullException.ThrowIfNull(result);
109+
#else
107110
if (result is null)
108111
{
109112
throw new ArgumentNullException(nameof(result));
110113
}
114+
#endif
111115

112116
if (!result.Succeeded)
113117
{

0 commit comments

Comments
 (0)