26 lines
606 B
C#
26 lines
606 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MarketData.Utils
|
|
{
|
|
public static class ExtensionMethods
|
|
{
|
|
public static bool IsNullOrEmpty<T>(this ICollection<T> list)
|
|
{
|
|
if(null==list || 0==list.Count())return true;
|
|
return false;
|
|
}
|
|
public static bool ContainsIgnoreCase(this List<String> list, string str)
|
|
{
|
|
foreach(String strString in list)
|
|
{
|
|
if(strString.Equals(str,StringComparison.InvariantCultureIgnoreCase))return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|