summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs8
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs11
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs7
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs4
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/ScanService.cs6
7 files changed, 29 insertions, 14 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
index e04c4e830..e20215bcf 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
@@ -13,9 +13,10 @@ namespace HandBrake.ApplicationServices.Services.Base
using System.IO;
using System.Text;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
@@ -35,7 +36,7 @@ namespace HandBrake.ApplicationServices.Services.Base
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
/// <summary>
/// Windows 7 API Pack wrapper
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 7553456d5..f0f1b656b 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -15,14 +15,16 @@ namespace HandBrake.ApplicationServices.Services
using System.Threading;
using System.Windows.Forms;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
- using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Base;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using Parser = HandBrake.ApplicationServices.Parsing.Parser;
+
/// <summary>
/// Class which handles the CLI
/// </summary>
@@ -33,7 +35,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
/// <summary>
/// Gets The Process Handle
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index 1fe1845ad..086305f4e 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -12,11 +12,14 @@ namespace HandBrake.ApplicationServices.Services
using System;
using System.Diagnostics;
- using HandBrake.ApplicationServices.Functions;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Base;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop;
+ using HandBrake.Interop.Interfaces;
using HandBrake.Interop.Model;
using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;
@@ -37,7 +40,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
/// <summary>
/// The Start time of the current Encode;
@@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// An Instance of the HandBrake Interop Library
/// </summary>
- private HandBrakeInstance instance;
+ private IHandBrakeInstance instance;
/// <summary>
/// A flag to indicate if logging is enabled or not.
@@ -62,7 +65,7 @@ namespace HandBrake.ApplicationServices.Services
public LibEncode()
{
// Setup the HandBrake Instance
- this.instance = ServiceManager.HandBrakeInstance;
+ this.instance = IoC.Get<IHandBrakeInstance>();
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;
this.instance.EncodeProgress += this.InstanceEncodeProgress;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 4957a62bb..a25f3a2a6 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -14,12 +14,15 @@ namespace HandBrake.ApplicationServices.Services
using System.Text;
using System.Threading;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop;
+ using HandBrake.Interop.Interfaces;
using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;
using ScanProgressEventArgs = HandBrake.Interop.ScanProgressEventArgs;
@@ -47,7 +50,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// LibHB Instance
/// </summary>
- private readonly HandBrakeInstance instance;
+ private readonly IHandBrakeInstance instance;
/// <summary>
/// Log data from HandBrakeInstance
@@ -68,7 +71,7 @@ namespace HandBrake.ApplicationServices.Services
{
logging = new StringBuilder();
- instance = ServiceManager.HandBrakeInstance;
+ instance = IoC.Get<IHandBrakeInstance>();
instance.Initialize(1);
instance.ScanProgress += this.InstanceScanProgress;
instance.ScanCompleted += this.InstanceScanCompleted;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
index 8337ddd56..2ddd775aa 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -19,6 +19,8 @@ namespace HandBrake.ApplicationServices.Services
using System.Text.RegularExpressions;
using System.Xml.Serialization;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -67,7 +69,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
#endregion
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index effe9f9b5..cd1ff226d 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -17,9 +17,9 @@ namespace HandBrake.ApplicationServices.Services
using Caliburn.Micro;
using HandBrake.ApplicationServices.EventArgs;
- using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.ApplicationServices.Utilities;
/// <summary>
/// The HandBrake Queue
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
index 5eb1f0a37..7edbdb320 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
@@ -16,12 +16,16 @@ namespace HandBrake.ApplicationServices.Services
using System.Threading;
using System.Windows.Forms;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using Parser = HandBrake.ApplicationServices.Parsing.Parser;
+
/// <summary>
/// Scan a Source
/// </summary>
@@ -52,7 +56,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
#endregion