Move APIKeys to file and allow read vs read/write
This commit is contained in:
12
Helpers/ExtensionMethods.cs
Normal file
12
Helpers/ExtensionMethods.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace TodoApi;
|
||||
|
||||
public static class ExtensionMethods
|
||||
{
|
||||
public static bool Contains(this IEnumerable<string> source, string toCheck, StringComparison comp)
|
||||
{
|
||||
return
|
||||
source != null &&
|
||||
!string.IsNullOrEmpty(toCheck) &&
|
||||
source.Any(x => string.Compare(x, toCheck, comp) == 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user