new IsInList overload
This commit is contained in:
parent
ad026acb66
commit
90e2976aab
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
public static bool IsInList<T>(this string stringValue, IEnumerable<T> listOfEnums) where T : struct, Enum => Enum.TryParse(stringValue, out T enumValue) && listOfEnums.Contains(enumValue);
|
public static bool IsInList<T>(this string stringValue, IEnumerable<T> listOfEnums) where T : struct, Enum => Enum.TryParse(stringValue, out T enumValue) && listOfEnums.Contains(enumValue);
|
||||||
|
|
||||||
|
public static bool IsInList<T>(this string stringValue, params T[] listOfEnums) where T : struct, Enum => Enum.TryParse(stringValue, out T enumValue) && listOfEnums.Contains(enumValue);
|
||||||
|
|
||||||
public static string NullIfWhiteSpace(this string s) => string.IsNullOrWhiteSpace(s) ? null : s;
|
public static string NullIfWhiteSpace(this string s) => string.IsNullOrWhiteSpace(s) ? null : s;
|
||||||
|
|
||||||
public static Guid ToGuidFromBase64(this string s)
|
public static Guid ToGuidFromBase64(this string s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user