2020-02-03 17:49:27 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 13:02:23 -07:00
|
|
|
using System;
|
2018-12-27 16:27:57 -07:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Extensions
|
|
|
|
{
|
2020-01-09 09:07:13 -07:00
|
|
|
// TODO: @bond remove
|
2018-12-27 16:27:57 -07:00
|
|
|
public static class ListHelper
|
|
|
|
{
|
|
|
|
public static bool ContainsIgnoreCase(string[] list, string value)
|
|
|
|
{
|
|
|
|
if (value == null)
|
|
|
|
{
|
2019-01-06 13:50:43 -07:00
|
|
|
throw new ArgumentNullException(nameof(value));
|
2018-12-27 16:27:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
{
|
|
|
|
if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|