aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-10-13 19:08:00 +0200
committerBond_009 <bond.009@outlook.com>2022-12-07 16:43:59 +0100
commitb366dc2e6e5be2b93f2b6fcc4549a32b655c3806 (patch)
tree8f7ee8407e31e58db9aabe74bfc21936275ec45e /MediaBrowser.Controller/Entities/BaseItem.cs
parent93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff)
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index b7934bc09..32fe1b3b0 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1755,10 +1755,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="ArgumentNullException">Throws if name is null.</exception>
public void AddStudio(string name)
{
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException(nameof(name));
- }
+ ArgumentException.ThrowIfNullOrEmpty(name);
var current = Studios;
@@ -1791,10 +1788,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="ArgumentNullException">Throwns if name is null.</exception>
public void AddGenre(string name)
{
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException(nameof(name));
- }
+ ArgumentException.ThrowIfNullOrEmpty(name);
var genres = Genres;
if (!genres.Contains(name, StringComparison.OrdinalIgnoreCase))