diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 11:50:21 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 11:50:21 -0500 |
| commit | 55a776427b97bec48a70a4b4f403b52935b620ea (patch) | |
| tree | 5fc0e1feaee36df2116a4842d3eb9d27c491bbae /MediaBrowser.Controller/Entities/IHasProductionLocations.cs | |
| parent | 9e84a712ae3da9eada815e790160a17153b76d37 (diff) | |
Removed unused properties from BaseItem.
Diffstat (limited to 'MediaBrowser.Controller/Entities/IHasProductionLocations.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/IHasProductionLocations.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/IHasProductionLocations.cs b/MediaBrowser.Controller/Entities/IHasProductionLocations.cs new file mode 100644 index 000000000..e4652fa8d --- /dev/null +++ b/MediaBrowser.Controller/Entities/IHasProductionLocations.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace MediaBrowser.Controller.Entities +{ + /// <summary> + /// Interface IHasProductionLocations + /// </summary> + public interface IHasProductionLocations + { + /// <summary> + /// Gets or sets the production locations. + /// </summary> + /// <value>The production locations.</value> + List<string> 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); + } + } + } +} |
