refactor: ♻️ 2.0 (#3)

This commit is contained in:
2023-12-14 15:03:07 +08:00
committed by GitHub
parent 8c0dbcf1f4
commit cf2988b389
73 changed files with 1157 additions and 371 deletions

View File

@ -0,0 +1,26 @@
namespace NSExt.Extensions;
/// <summary>
/// EnumerableExtensions
/// </summary>
public static class EnumerableExtensions
{
/// <summary>
/// 将列表转成分隔符分隔的字符串
/// </summary>
public static string Join(this IEnumerable<object> me, string separator)
{
return string.Join(separator, me);
}
/// <summary>
/// 判断对象是否为null或不存在子元素如果为集合对象
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="me">me</param>
/// <returns>空则返回true</returns>
public static bool NullOrEmpty<T>(this IEnumerable<T> me)
{
return me?.Any() != true;
}
}