summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Base
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-08-22 20:11:18 +0000
committersr55 <[email protected]>2012-08-22 20:11:18 +0000
commitcbe5f09e69c95df3be3b38de06c2b7bd6b5bd949 (patch)
tree298b9b143b38433e16854089f6afe9d5d59cbe7e /win/CS/HandBrake.ApplicationServices/Services/Base
parentd363a3f1c5f19df252ba1ac118c7bb3bf2bf4e7c (diff)
WinGui: Initial Work to wire up Encode Process Isolation.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4914 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Base')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs28
1 files changed, 15 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
index e20215bcf..36b9002bc 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
@@ -13,8 +13,6 @@ 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.Model;
@@ -31,17 +29,22 @@ namespace HandBrake.ApplicationServices.Services.Base
/// <summary>
/// A Lock for the filewriter
/// </summary>
- private static readonly object fileWriterLock = new object();
+ private static readonly object FileWriterLock = new object();
/// <summary>
/// The User Setting Service
/// </summary>
- private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
+ private readonly IUserSettingService userSettingService;
/// <summary>
/// Windows 7 API Pack wrapper
/// </summary>
- private Win7 windowsSeven = new Win7();
+ private readonly Win7 windowsSeven = new Win7();
+
+ /// <summary>
+ /// The Log File Header
+ /// </summary>
+ private readonly StringBuilder header = GeneralUtilities.CreateCliLogHeader();
/// <summary>
/// The Log Buffer
@@ -53,18 +56,17 @@ namespace HandBrake.ApplicationServices.Services.Base
/// </summary>
private StreamWriter fileWriter;
- /// <summary>
- /// The Log File Header
- /// </summary>
- private StringBuilder header = GeneralUtilities.CreateCliLogHeader();
-
#endregion
/// <summary>
/// Initializes a new instance of the <see cref="EncodeBase"/> class.
/// </summary>
- public EncodeBase()
+ /// <param name="userSettingService">
+ /// The user Setting Service.
+ /// </param>
+ public EncodeBase(IUserSettingService userSettingService)
{
+ this.userSettingService = userSettingService;
this.logBuffer = new StringBuilder();
}
@@ -310,7 +312,7 @@ namespace HandBrake.ApplicationServices.Services.Base
this.LogBuffer.AppendLine(message);
}
- lock (fileWriterLock)
+ lock (FileWriterLock)
{
if (this.fileWriter != null && this.fileWriter.BaseStream.CanWrite)
{
@@ -341,7 +343,7 @@ namespace HandBrake.ApplicationServices.Services.Base
{
try
{
- lock (fileWriterLock)
+ lock (FileWriterLock)
{
if (this.fileWriter != null)
{