using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Share.Tools;
public static class ListExtensions
{
    public static bool IsNullOrEmpty<T>(this List<T> value)
    {
        return value == null || value.Count == 0;
    }

    public static bool NotNullOrEmpty<T>(this List<T> value)
    {
        return value != null && value.Count != 0;
    }

    public static bool NotNullOrEmpty<T>(this IList<T> value)
    {
        return value != null && value.Count != 0;
    }

    public static bool IsNullOrEmpty<T>(this IList<T> value)
    {
        return value == null || value.Count == 0;
    }

    public static bool NotNullOrEmpty<T>(this IReadOnlyList<T> value)
    {
        return value != null && value.Count != 0;
    }

}
