-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for .NET 6 and .NET 7 (#34)
- Loading branch information
Showing
16 changed files
with
151 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/AspNetCore.Identity.Permissions.EntityFrameworkCore/Guard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace MadEyeMatt.AspNetCore.Identity.Permissions.EntityFrameworkCore | ||
{ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Runtime.CompilerServices; | ||
|
||
internal static class Guard | ||
{ | ||
internal static void ThrowIfNull([NotNull] object argument, [CallerArgumentExpression("argument")] string parameterName = null) | ||
{ | ||
if (argument != null) | ||
{ | ||
return; | ||
} | ||
|
||
throw new ArgumentNullException(parameterName); | ||
} | ||
|
||
public static void ThrowIfNullOrWhiteSpace([NotNull] string argument, [CallerArgumentExpression("argument")] string parameterName = null) | ||
{ | ||
if (!string.IsNullOrWhiteSpace(argument)) | ||
{ | ||
return; | ||
} | ||
|
||
throw new ArgumentException(argument, parameterName); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace MadEyeMatt.AspNetCore.Identity.Permissions.MongoDB | ||
{ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Runtime.CompilerServices; | ||
|
||
internal static class Guard | ||
{ | ||
internal static void ThrowIfNull([NotNull] object argument, [CallerArgumentExpression("argument")] string parameterName = null) | ||
{ | ||
if (argument != null) | ||
{ | ||
return; | ||
} | ||
|
||
throw new ArgumentNullException(parameterName); | ||
} | ||
|
||
public static void ThrowIfNullOrWhiteSpace([NotNull] string argument, [CallerArgumentExpression("argument")] string parameterName = null) | ||
{ | ||
if (!string.IsNullOrWhiteSpace(argument)) | ||
{ | ||
return; | ||
} | ||
|
||
throw new ArgumentException(argument, parameterName); | ||
} | ||
} | ||
} |
Oops, something went wrong.