diff options
5 files changed, 8 insertions, 56 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj index 7d9ac2a82..07503ded8 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj @@ -101,12 +101,6 @@ <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core">
- <HintPath>..\..\libraries\caliburn\Castle.Core.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Windsor">
- <HintPath>..\..\libraries\caliburn\Castle.Windsor.dll</HintPath>
- </Reference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
@@ -147,7 +141,6 @@ <Compile Include="HbLib\NativeConstants.cs" />
<Compile Include="Interfaces\IHandBrakeInstance.cs" />
<Compile Include="InteropUtilities.cs" />
- <Compile Include="InteropWindsorInstaller.cs" />
<Compile Include="Language.cs" />
<Compile Include="LanguageCodes.cs" />
<Compile Include="MarshalingConstants.cs" />
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs deleted file mode 100644 index 91383f8b5..000000000 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs +++ /dev/null @@ -1,38 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="InteropWindsorInstaller.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// An Implimentation of IWindsorInstaller for this library.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop
-{
- using Castle.Core;
- using Castle.MicroKernel.Registration;
- using Castle.MicroKernel.SubSystems.Configuration;
- using Castle.Windsor;
-
- using HandBrake.Interop.Interfaces;
-
- /// <summary>
- /// An Implimentation of IWindsorInstaller for this library.
- /// </summary>
- public class InteropWindsorInstaller : IWindsorInstaller
- {
- /// <summary>
- /// An Implimentation of IWindsorInstaller for this library.
- /// </summary>
- /// <param name="container">
- /// The container.
- /// </param>
- /// <param name="store">
- /// The store.
- /// </param>
- public void Install(IWindsorContainer container, IConfigurationStore store)
- {
- container.Register(Component.For<IHandBrakeInstance>().ImplementedBy<HandBrakeInstance>().LifeStyle.Is(LifestyleType.Singleton));
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs index 79d79164f..a3506a60d 100644 --- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs @@ -13,14 +13,11 @@ namespace HandBrakeWPF.Services {
using System;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Isolation;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
- using HandBrake.Interop.Interfaces;
using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;
using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;
@@ -66,8 +63,7 @@ namespace HandBrakeWPF.Services }
else
{
- IHandBrakeInstance handBrakeInstance = IoC.Get<IHandBrakeInstance>();
- this.encodeService = new LibEncode(userSettingService, handBrakeInstance);
+ this.encodeService = new LibEncode(userSettingService, ScanServiceWrapper.HandbrakeInstance);
}
}
catch (Exception exc)
diff --git a/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs index a25213a6b..ffbbae5c0 100644 --- a/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs @@ -13,13 +13,12 @@ namespace HandBrakeWPF.Services {
using System;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Isolation;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.Interop;
using HandBrake.Interop.Interfaces;
/// <summary>
@@ -32,6 +31,11 @@ namespace HandBrakeWPF.Services #region Constants and Fields
/// <summary>
+ /// The handbrake instance.
+ /// </summary>
+ public static readonly IHandBrakeInstance HandbrakeInstance = new HandBrakeInstance();
+
+ /// <summary>
/// The scan service.
/// </summary>
private readonly IScan scanService;
@@ -63,8 +67,7 @@ namespace HandBrakeWPF.Services }
else
{
- IHandBrakeInstance handBrakeInstance = IoC.Get<IHandBrakeInstance>();
- this.scanService = new LibScan(userSettingService, handBrakeInstance);
+ this.scanService = new LibScan(userSettingService, HandbrakeInstance);
}
}
catch(Exception exc)
diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs index e34f98ada..ed4796836 100644 --- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -22,7 +22,6 @@ namespace HandBrakeWPF.Startup using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Services.Interfaces;
- using HandBrake.Interop;
using ViewModels;
using ViewModels.Interfaces;
@@ -51,7 +50,6 @@ namespace HandBrakeWPF.Startup // Initialise the ApplicationServices IWindsorInstaller
this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<ServicesWindsorInstaller>());
- this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<InteropWindsorInstaller>());
this.windsorContainer.Install(windsorContainer.ResolveAll<IWindsorInstaller>());
// Services
|