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