2020-02-04 00:49:27 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
#pragma warning disable SA1600
|
|
|
|
|
2019-01-13 20:02:23 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Extensions
|
|
|
|
{
|
2020-01-09 16:07:13 +00:00
|
|
|
// TODO: @bond remove
|
2018-12-27 23:27:57 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|