2018-12-27 23:27:57 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Extensions
|
|
|
|
|
{
|
|
|
|
|
public static class ListHelper
|
|
|
|
|
{
|
|
|
|
|
public static bool ContainsIgnoreCase(string[] list, string value)
|
|
|
|
|
{
|
|
|
|
|
if (value == null)
|
|
|
|
|
{
|
2019-01-06 20:50:43 +00:00
|
|
|
|
throw new ArgumentNullException(nameof(value));
|
2018-12-27 23:27:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|