diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-04 09:52:38 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-04 09:52:38 -0500 |
| commit | 4e79eaf65e8edb895f9337a8b878ff9ef312b3f6 (patch) | |
| tree | ae9f74aad256236ada5203fae1f1640867d13360 /MediaBrowser.Common.Implementations/BaseApplicationHost.cs | |
| parent | 40959a816f49d040e16e0178d0e11d51282d98cc (diff) | |
add ApplicationPath to app paths interface to hide implementation
Diffstat (limited to 'MediaBrowser.Common.Implementations/BaseApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/BaseApplicationHost.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index becf649f4..e8f4d51eb 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -33,7 +33,7 @@ namespace MediaBrowser.Common.Implementations /// </summary> /// <typeparam name="TApplicationPathsType">The type of the T application paths type.</typeparam> public abstract class BaseApplicationHost<TApplicationPathsType> : IApplicationHost - where TApplicationPathsType : class, IApplicationPaths, new() + where TApplicationPathsType : class, IApplicationPaths { /// <summary> /// Occurs when [has pending restart changed]. @@ -83,7 +83,7 @@ namespace MediaBrowser.Common.Implementations /// <summary> /// The json serializer /// </summary> - public readonly IJsonSerializer JsonSerializer = new JsonSerializer(); + public IJsonSerializer JsonSerializer { get; private set; } /// <summary> /// The _XML serializer @@ -153,7 +153,7 @@ namespace MediaBrowser.Common.Implementations protected IInstallationManager InstallationManager { get; private set; } protected IFileSystem FileSystemManager { get; private set; } - + /// <summary> /// Gets or sets the zip client. /// </summary> @@ -181,6 +181,8 @@ namespace MediaBrowser.Common.Implementations /// <returns>Task.</returns> public virtual async Task Init() { + JsonSerializer = CreateJsonSerializer(); + IsFirstRun = !ConfigurationManager.CommonConfiguration.IsStartupWizardCompleted; Logger = LogManager.GetLogger("App"); @@ -212,6 +214,11 @@ namespace MediaBrowser.Common.Implementations } + protected virtual IJsonSerializer CreateJsonSerializer() + { + return new JsonSerializer(); + } + private void SetHttpLimit() { try @@ -224,7 +231,7 @@ namespace MediaBrowser.Common.Implementations Logger.ErrorException("Error setting http limit", ex); } } - + /// <summary> /// Installs the iso mounters. /// </summary> |
