jellyfin-server/MediaBrowser.Model/Extensions/ListHelper.cs
2014-06-29 15:59:52 -04:00

29 lines
742 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Model.Extensions
{
public static class ListHelper
{
public static bool ContainsIgnoreCase(List<string> list, string value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
return list.Contains(value, StringComparer.OrdinalIgnoreCase);
}
public static bool ContainsIgnoreCase(string[] list, string value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
return list.Contains(value, StringComparer.OrdinalIgnoreCase);
}
}
}