16 lines
364 B
C#
16 lines
364 B
C#
using System.Collections;
|
|
|
|
namespace Yuna.Website.Server.Infrastructure
|
|
{
|
|
public static class CollectionExtensions
|
|
{
|
|
public static bool IsNullOrEmpty<T>(this T? collection) where T : IList
|
|
{
|
|
if (collection is null) return true;
|
|
if (collection.Count == 0) return true;
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|