using System; using System.Collections.Generic; using System.Linq; namespace MediaBrowser.Controller.Entities { /// /// Interface IHasProductionLocations /// public interface IHasProductionLocations { /// /// Gets or sets the production locations. /// /// The production locations. List ProductionLocations { get; set; } } public static class ProductionLocationExtensions { public static void AddProductionLocation(this IHasProductionLocations item, string name) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException("name"); } if (!item.ProductionLocations.Contains(name, StringComparer.OrdinalIgnoreCase)) { item.ProductionLocations.Add(name); } } } }