diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-13 16:45:12 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-13 16:45:12 -0400 |
| commit | dc5fb2f4c2d0ab538821bf1d8d75b243a80d45e0 (patch) | |
| tree | c78b5d51d0a2261f5ee23daa300d268e74baeee2 /MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | |
| parent | 99d5453a5c2cdb26b9801251d59c2cc0adbf4747 (diff) | |
updated mb registration to use network manager
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs index 3abdeada4..19a1ed646 100644 --- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs +++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs @@ -1,14 +1,13 @@ -using System.Collections.Generic; -using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Net; using MediaBrowser.Common.Security; -using MediaBrowser.Model.Serialization; -using MediaBrowser.Common.Implementations.Security; using MediaBrowser.Model.Entities; -using MediaBrowser.Common.Net; +using MediaBrowser.Model.Serialization; using System; +using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; -using System.Linq; namespace MediaBrowser.Common.Implementations.Security { @@ -47,7 +46,9 @@ namespace MediaBrowser.Common.Implementations.Security private readonly IJsonSerializer _jsonSerializer; private readonly IApplicationHost _appHost; private readonly IApplicationPaths _applciationPaths; - private IEnumerable<IRequiresRegistration> _registeredEntities; + private readonly INetworkManager _networkManager; + + private IEnumerable<IRequiresRegistration> _registeredEntities; protected IEnumerable<IRequiresRegistration> RegisteredEntities { get @@ -59,7 +60,7 @@ namespace MediaBrowser.Common.Implementations.Security /// <summary> /// Initializes a new instance of the <see cref="PluginSecurityManager" /> class. /// </summary> - public PluginSecurityManager(IApplicationHost appHost, IHttpClient httpClient, IJsonSerializer jsonSerializer, IApplicationPaths appPaths) + public PluginSecurityManager(IApplicationHost appHost, IHttpClient httpClient, IJsonSerializer jsonSerializer, IApplicationPaths appPaths, INetworkManager networkManager) { if (httpClient == null) { @@ -67,6 +68,7 @@ namespace MediaBrowser.Common.Implementations.Security } _applciationPaths = appPaths; + _networkManager = networkManager; _appHost = appHost; _httpClient = httpClient; _jsonSerializer = jsonSerializer; @@ -95,7 +97,7 @@ namespace MediaBrowser.Common.Implementations.Security { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param - MBRegistration.Init(_applciationPaths); + MBRegistration.Init(_applciationPaths, _networkManager); return await MBRegistration.GetRegistrationStatus(_httpClient, _jsonSerializer, feature, mb2Equivalent).ConfigureAwait(false); } @@ -109,14 +111,14 @@ namespace MediaBrowser.Common.Implementations.Security { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param - MBRegistration.Init(_applciationPaths); + MBRegistration.Init(_applciationPaths, _networkManager); return MBRegistration.SupporterKey; } set { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param - MBRegistration.Init(_applciationPaths); + MBRegistration.Init(_applciationPaths, _networkManager); if (value != MBRegistration.SupporterKey) { MBRegistration.SupporterKey = value; @@ -136,14 +138,14 @@ namespace MediaBrowser.Common.Implementations.Security { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param - MBRegistration.Init(_applciationPaths); + MBRegistration.Init(_applciationPaths, _networkManager); return MBRegistration.LegacyKey; } set { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param - MBRegistration.Init(_applciationPaths); + MBRegistration.Init(_applciationPaths, _networkManager); if (value != MBRegistration.LegacyKey) { MBRegistration.LegacyKey = value; |
