diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2014-01-29 12:22:53 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2014-01-29 12:22:53 -0500 |
| commit | ab5145bcd794ee579e0064c9c0f9d15b13f72fb4 (patch) | |
| tree | d68cdabe4302cc4dda8194ee840060f48d9fa714 /MediaBrowser.Model/Entities/IHasProviderIds.cs | |
| parent | 1f31c8dbfca9ca9134d9ee779256c435f913689b (diff) | |
| parent | c0f606683a045e463f518ec466b9fc9a85f8d4fd (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Model/Entities/IHasProviderIds.cs')
| -rw-r--r-- | MediaBrowser.Model/Entities/IHasProviderIds.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs index 1c54455da..efb75412f 100644 --- a/MediaBrowser.Model/Entities/IHasProviderIds.cs +++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs @@ -21,6 +21,17 @@ namespace MediaBrowser.Model.Entities public static class ProviderIdsExtensions { /// <summary> + /// Determines whether [has provider identifier] [the specified instance]. + /// </summary> + /// <param name="instance">The instance.</param> + /// <param name="provider">The provider.</param> + /// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns> + public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider) + { + return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString())); + } + + /// <summary> /// Gets a provider id /// </summary> /// <param name="instance">The instance.</param> |
