using System.Collections.Generic;
using API.Entities;
namespace API.Extensions
{
public static class SeriesExtensions
{
///
/// Checks against all the name variables of the Series if it matches anything in the list.
///
///
///
///
public static bool NameInList(this Series series, IEnumerable list)
{
foreach (var name in list)
{
if (Parser.Parser.Normalize(name) == series.NormalizedName || name == series.Name || name == series.LocalizedName || name == series.OriginalName)
{
return true;
}
}
return false;
}
}
}