Add overload for existing plug-in support

This commit is contained in:
Eric Reed 2014-01-26 09:32:38 -05:00
parent 4abdc02aa1
commit 1f31c8dbfc
2 changed files with 23 additions and 3 deletions

View File

@ -90,6 +90,18 @@ namespace MediaBrowser.Common.Implementations.Security
await Task.WhenAll(tasks);
}
/// <summary>
/// Gets the registration status.
/// This overload supports existing plug-ins.
/// </summary>
/// <param name="feature">The feature.</param>
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
/// <returns>Task{MBRegistrationRecord}.</returns>
public async Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null)
{
return await MBRegistration.GetRegistrationStatus(_httpClient, _jsonSerializer, feature, mb2Equivalent).ConfigureAwait(false);
}
/// <summary>
/// Gets the registration status.
/// </summary>
@ -97,7 +109,7 @@ namespace MediaBrowser.Common.Implementations.Security
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
/// <param name="version">The version of this feature</param>
/// <returns>Task{MBRegistrationRecord}.</returns>
public async Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null, string version = null)
public async Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent, string version)
{
return await MBRegistration.GetRegistrationStatus(_httpClient, _jsonSerializer, feature, mb2Equivalent, version).ConfigureAwait(false);
}

View File

@ -23,6 +23,15 @@ namespace MediaBrowser.Common.Security
/// <value>The legacy key.</value>
string LegacyKey { get; set; }
/// <summary>
/// Gets the registration status. Overload to support existing plug-ins.
/// </summary>
/// <param name="feature">The feature.</param>
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
/// <param name="version">The version of the feature</param>
/// <returns>Task{MBRegistrationRecord}.</returns>
Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null);
/// <summary>
/// Gets the registration status.
/// </summary>
@ -30,8 +39,7 @@ namespace MediaBrowser.Common.Security
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
/// <param name="version">The version of the feature</param>
/// <returns>Task{MBRegistrationRecord}.</returns>
Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null, string version = null);
Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent, string version);
/// <summary>
/// Load all registration info for all entities that require registration
/// </summary>