<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>\r
</PropertyGroup>\r
<ItemGroup>\r
- <Reference Include="Castle.Core">\r
- <HintPath>..\..\libraries\caliburn\Castle.Core.dll</HintPath>\r
- </Reference>\r
- <Reference Include="Castle.Windsor">\r
- <HintPath>..\..\libraries\caliburn\Castle.Windsor.dll</HintPath>\r
- </Reference>\r
<Reference Include="PresentationCore">\r
<RequiredTargetFramework>3.0</RequiredTargetFramework>\r
</Reference>\r
<Compile Include="HbLib\NativeConstants.cs" />\r
<Compile Include="Interfaces\IHandBrakeInstance.cs" />\r
<Compile Include="InteropUtilities.cs" />\r
- <Compile Include="InteropWindsorInstaller.cs" />\r
<Compile Include="Language.cs" />\r
<Compile Include="LanguageCodes.cs" />\r
<Compile Include="MarshalingConstants.cs" />\r
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="InteropWindsorInstaller.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// An Implimentation of IWindsorInstaller for this library.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.Interop\r
-{\r
- using Castle.Core;\r
- using Castle.MicroKernel.Registration;\r
- using Castle.MicroKernel.SubSystems.Configuration;\r
- using Castle.Windsor;\r
-\r
- using HandBrake.Interop.Interfaces;\r
-\r
- /// <summary>\r
- /// An Implimentation of IWindsorInstaller for this library.\r
- /// </summary>\r
- public class InteropWindsorInstaller : IWindsorInstaller\r
- {\r
- /// <summary>\r
- /// An Implimentation of IWindsorInstaller for this library.\r
- /// </summary>\r
- /// <param name="container">\r
- /// The container.\r
- /// </param>\r
- /// <param name="store">\r
- /// The store.\r
- /// </param>\r
- public void Install(IWindsorContainer container, IConfigurationStore store)\r
- {\r
- container.Register(Component.For<IHandBrakeInstance>().ImplementedBy<HandBrakeInstance>().LifeStyle.Is(LifestyleType.Singleton));\r
- }\r
- }\r
-}\r
{\r
using System;\r
\r
- using Caliburn.Micro;\r
-\r
using HandBrake.ApplicationServices.Exceptions;\r
using HandBrake.ApplicationServices.Isolation;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
- using HandBrake.Interop.Interfaces;\r
\r
using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;\r
using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;\r
}\r
else\r
{\r
- IHandBrakeInstance handBrakeInstance = IoC.Get<IHandBrakeInstance>();\r
- this.encodeService = new LibEncode(userSettingService, handBrakeInstance);\r
+ this.encodeService = new LibEncode(userSettingService, ScanServiceWrapper.HandbrakeInstance);\r
}\r
}\r
catch (Exception exc)\r
{\r
using System;\r
\r
- using Caliburn.Micro;\r
-\r
using HandBrake.ApplicationServices.Exceptions;\r
using HandBrake.ApplicationServices.Isolation;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.Interop;\r
using HandBrake.Interop.Interfaces;\r
\r
/// <summary>\r
{\r
#region Constants and Fields\r
\r
+ /// <summary>\r
+ /// The handbrake instance.\r
+ /// </summary>\r
+ public static readonly IHandBrakeInstance HandbrakeInstance = new HandBrakeInstance();\r
+\r
/// <summary>\r
/// The scan service.\r
/// </summary>\r
}\r
else\r
{\r
- IHandBrakeInstance handBrakeInstance = IoC.Get<IHandBrakeInstance>();\r
- this.scanService = new LibScan(userSettingService, handBrakeInstance);\r
+ this.scanService = new LibScan(userSettingService, HandbrakeInstance);\r
}\r
} \r
catch(Exception exc)\r
\r
using HandBrake.ApplicationServices;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
- using HandBrake.Interop;\r
\r
using ViewModels;\r
using ViewModels.Interfaces;\r
\r
// Initialise the ApplicationServices IWindsorInstaller\r
this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<ServicesWindsorInstaller>());\r
- this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<InteropWindsorInstaller>());\r
this.windsorContainer.Install(windsorContainer.ResolveAll<IWindsorInstaller>());\r
\r
// Services\r