]> granicus.if.org Git - handbrake/commitdiff
WinGui: Remove Castle references from HandBrake.Interop
authorsr55 <sr55.hb@outlook.com>
Sat, 6 Oct 2012 19:39:22 +0000 (19:39 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 6 Oct 2012 19:39:22 +0000 (19:39 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5003 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj
win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs [deleted file]
win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs
win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs

index 7d9ac2a82902a7ef697a8921a5a7e229e783b793..07503ded8c3ff55711a827a9f962418fce38a46c 100644 (file)
     <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
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropWindsorInstaller.cs
deleted file mode 100644 (file)
index 91383f8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\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
index 79d79164f7c734b531c4ae0aae24a6e513c3a776..a3506a60ddf51fc0fa53206c3baf75163da4742b 100644 (file)
@@ -13,14 +13,11 @@ namespace HandBrakeWPF.Services
 {\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
@@ -66,8 +63,7 @@ namespace HandBrakeWPF.Services
                     }\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
index a25213a6be3fcf63ccfb47df948140497cd00ef2..ffbbae5c0a8a16460a394958183dc9736e0f8510 100644 (file)
@@ -13,13 +13,12 @@ namespace HandBrakeWPF.Services
 {\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
@@ -31,6 +30,11 @@ namespace HandBrakeWPF.Services
     {\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
@@ -63,8 +67,7 @@ namespace HandBrakeWPF.Services
                     }\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
index e34f98adac1e3f9a6e475ea31cfcd959c3bf2c50..ed4796836792fb8f8de86dae4b7a5eaf26c94ea0 100644 (file)
@@ -22,7 +22,6 @@ namespace HandBrakeWPF.Startup
 \r
     using HandBrake.ApplicationServices;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
-    using HandBrake.Interop;\r
 \r
     using ViewModels;\r
     using ViewModels.Interfaces;\r
@@ -51,7 +50,6 @@ namespace HandBrakeWPF.Startup
 \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