Creata pagina "user"
This commit is contained in:
18
SteUp.Shared/Core/Helpers/ObjectExtensions.cs
Normal file
18
SteUp.Shared/Core/Helpers/ObjectExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace SteUp.Shared.Core.Helpers;
|
||||
|
||||
public static class ObjectExtensions
|
||||
{
|
||||
public static bool IsNullOrEmpty(this IEnumerable? obj) =>
|
||||
obj == null || !obj.GetEnumerator().MoveNext();
|
||||
|
||||
public static bool IsNullOrEmpty(this string? obj) =>
|
||||
string.IsNullOrEmpty(obj);
|
||||
|
||||
public static bool EqualsIgnoreCase(this string obj, string other) =>
|
||||
string.Equals(obj, other, StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
public static bool ContainsIgnoreCase(this string obj, string other) =>
|
||||
obj.Contains(other, StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
Reference in New Issue
Block a user