remove and/or delay unnecessary startup work

This commit is contained in:
Luke Pulverenti
2013-04-08 11:55:53 -04:00
parent 59cfad03e8
commit 804115bf8d
18 changed files with 341 additions and 215 deletions

View File

@@ -195,8 +195,6 @@ namespace MediaBrowser.Common.Implementations
Task.Run(() => ConfigureAutoRunAtStartup());
Task.Run(() => SecurityManager.LoadAllRegistrationInfo());
ConfigurationManager.ConfigurationUpdated += ConfigurationManager_ConfigurationUpdated;
});
}
@@ -236,11 +234,6 @@ namespace MediaBrowser.Common.Implementations
var assemblies = GetComposablePartAssemblies().ToArray();
foreach (var assembly in assemblies)
{
Logger.Info("Loading {0}", assembly.FullName);
}
AllTypes = assemblies.SelectMany(GetTypes).ToArray();
AllConcreteTypes = AllTypes.Where(t => t.IsClass && !t.IsAbstract && !t.IsInterface && !t.IsGenericType).ToArray();
@@ -270,19 +263,15 @@ namespace MediaBrowser.Common.Implementations
RegisterSingleInstance(TaskManager);
HttpClient = new HttpClientManager.HttpClientManager(ApplicationPaths, Logger);
RegisterSingleInstance(HttpClient);
NetworkManager = new NetworkManager();
RegisterSingleInstance(NetworkManager);
SecurityManager = new PluginSecurityManager(this, HttpClient, JsonSerializer, ApplicationPaths);
RegisterSingleInstance(SecurityManager);
PackageManager = new PackageManager(SecurityManager, NetworkManager, HttpClient, ApplicationPaths, JsonSerializer, Logger);
RegisterSingleInstance(PackageManager);
});
}