2020-04-05 16:10:56 +00:00
|
|
|
#nullable disable
|
2020-02-04 00:49:27 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2020-04-05 16:10:56 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|