create platform-specific network manager implementation

This commit is contained in:
Luke Pulverenti
2013-10-05 13:13:32 -04:00
parent 6a665e1807
commit 478be44dd6
15 changed files with 369 additions and 303 deletions

View File

@@ -2,7 +2,6 @@
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Implementations.Archiving;
using MediaBrowser.Common.Implementations.IO;
using MediaBrowser.Common.Implementations.NetworkManagement;
using MediaBrowser.Common.Implementations.ScheduledTasks;
using MediaBrowser.Common.Implementations.Security;
using MediaBrowser.Common.Implementations.Serialization;
@@ -335,7 +334,7 @@ namespace MediaBrowser.Common.Implementations
HttpClient = new HttpClientManager.HttpClientManager(ApplicationPaths, Logger, CreateHttpClient);
RegisterSingleInstance(HttpClient);
NetworkManager = new NetworkManager();
NetworkManager = CreateNetworkManager();
RegisterSingleInstance(NetworkManager);
SecurityManager = new PluginSecurityManager(this, HttpClient, JsonSerializer, ApplicationPaths, NetworkManager);
@@ -379,6 +378,8 @@ namespace MediaBrowser.Common.Implementations
}
}
protected abstract INetworkManager CreateNetworkManager();
/// <summary>
/// Creates an instance of type and resolves all constructor dependancies
/// </summary>