diff options
Diffstat (limited to 'MediaBrowser.Model/Entities/IHasProviderIds.cs')
| -rw-r--r-- | MediaBrowser.Model/Entities/IHasProviderIds.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs index 2ddf8ffad..1c54455da 100644 --- a/MediaBrowser.Model/Entities/IHasProviderIds.cs +++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs @@ -39,6 +39,11 @@ namespace MediaBrowser.Model.Entities /// <returns>System.String.</returns> public static string GetProviderId(this IHasProviderIds instance, string name) { + if (instance == null) + { + throw new ArgumentNullException("instance"); + } + if (instance.ProviderIds == null) { return null; @@ -57,6 +62,11 @@ namespace MediaBrowser.Model.Entities /// <param name="value">The value.</param> public static void SetProviderId(this IHasProviderIds instance, string name, string value) { + if (instance == null) + { + throw new ArgumentNullException("instance"); + } + // If it's null remove the key from the dictionary if (string.IsNullOrEmpty(value)) { |
