]> granicus.if.org Git - handbrake/commitdiff
WinGui: Strip out the last traces of MEF since it's not going to be used.
authorsr55 <sr55.hb@outlook.com>
Mon, 27 Aug 2012 18:35:56 +0000 (18:35 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 27 Aug 2012 18:35:56 +0000 (18:35 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4920 b64f7644-9d1e-0410-96f1-a4d463321fa5

18 files changed:
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs [deleted file]
win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
win/CS/HandBrakeWPF/ViewModels/TitleSpecificViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs

index d3682caebccfe4ff7c7e3444b0c14ce17aa60bca..f6bb499b0a9b71066b53f56e75e5f95d5028851c 100644 (file)
@@ -92,7 +92,6 @@
     </Reference>\r
     <Reference Include="PresentationFramework" />\r
     <Reference Include="System" />\r
-    <Reference Include="System.ComponentModel.Composition" />\r
     <Reference Include="System.Drawing" />\r
     <Reference Include="System.Management" />\r
     <Reference Include="System.Runtime.Serialization" />\r
     <Compile Include="Services\Interfaces\IUpdateVersionService.cs" />\r
     <Compile Include="Services\UpdateVersionService.cs" />\r
     <Compile Include="Startup\CastleBootstrapper.cs" />\r
-    <Compile Include="Startup\MefBootstrapper.cs" />\r
     <Compile Include="UserSettingConstants.cs" />\r
     <Compile Include="ViewModels\AboutViewModel.cs" />\r
     <Compile Include="ViewModels\AddPresetViewModel.cs" />\r
diff --git a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs
deleted file mode 100644 (file)
index 730081a..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="MefBootstrapper.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
-//   The MEF Bootstrapper (Not Used)\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrakeWPF.Startup \r
-{\r
-    using System;\r
-    using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
-    using System.ComponentModel.Composition.Hosting;\r
-    using System.Linq;\r
-\r
-    using Caliburn.Micro;\r
-\r
-    using HandBrakeWPF.ViewModels.Interfaces;\r
-\r
-    /// <summary>\r
-    /// The MEF Bootstrapper (Not Used)\r
-    /// </summary>\r
-    public class MefBootstrapper : Bootstrapper<IMainViewModel>\r
-    {\r
-        /// <summary>\r
-        /// The Backing field for the container\r
-        /// </summary>\r
-        private CompositionContainer container;\r
-\r
-        /// <summary>\r
-        /// MEF Configure\r
-        /// </summary>\r
-        protected override void Configure()\r
-        {\r
-            container = new CompositionContainer(\r
-                new AggregateCatalog(AssemblySource.Instance.Select(x => new AssemblyCatalog(x)))\r
-                );\r
-\r
-            var batch = new CompositionBatch();\r
-\r
-            batch.AddExportedValue<IWindowManager>(new WindowManager());\r
-            batch.AddExportedValue<IEventAggregator>(new EventAggregator());\r
-            batch.AddExportedValue(container);\r
-\r
-            container.Compose(batch);\r
-        }\r
-\r
-        /// <summary>\r
-        /// Get an Instance of a service\r
-        /// </summary>\r
-        /// <param name="serviceType">\r
-        /// The service.\r
-        /// </param>\r
-        /// <param name="key">\r
-        /// The key.\r
-        /// </param>\r
-        /// <returns>\r
-        /// The Service Requested\r
-        /// </returns>\r
-        protected override object GetInstance(Type serviceType, string key)\r
-        {\r
-            string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key;\r
-            var exports = container.GetExportedValues<object>(contract);\r
-\r
-            if (exports.Count() > 0)\r
-                return exports.First();\r
-\r
-            throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract));\r
-        }\r
-\r
-        /// <summary>\r
-        /// Get all instances of a service\r
-        /// </summary>\r
-        /// <param name="serviceType">\r
-        /// The service.\r
-        /// </param>\r
-        /// <returns>\r
-        /// A collection of instances of the requested service type.\r
-        /// </returns>\r
-        protected override IEnumerable<object> GetAllInstances(Type serviceType)\r
-        {\r
-            return container.GetExportedValues<object>(AttributedModelServices.GetContractName(serviceType));\r
-        }\r
-\r
-        /// <summary>\r
-        /// Build Up\r
-        /// </summary>\r
-        /// <param name="instance">\r
-        /// The instance.\r
-        /// </param>\r
-        protected override void BuildUp(object instance)\r
-        {\r
-            container.SatisfyImportsOnce(instance);\r
-        }\r
-    }\r
-}
\ No newline at end of file
index e506fb987ace3c363d667a4991e4160bfbc4150c..e261062b5fcd2c5198344576dacc25b0d6c33cfc 100644 (file)
@@ -9,8 +9,6 @@
 \r
 namespace HandBrakeWPF.ViewModels\r
 {\r
-    using System.ComponentModel.Composition;\r
-\r
     using Caliburn.Micro;\r
 \r
     using HandBrake.ApplicationServices;\r
@@ -21,7 +19,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The About View Model\r
     /// </summary>\r
-    [Export(typeof(IAboutViewModel))]\r
     public class AboutViewModel : ViewModelBase, IAboutViewModel\r
     {\r
         /// <summary>\r
index 69caa66dcd53bf6c659154fc59be5ab56b9a6974..00d6652b6429df806eb002e64af2bb5580383647 100644 (file)
@@ -10,7 +10,6 @@
 namespace HandBrakeWPF.ViewModels\r
 {\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
     using System.Windows;\r
 \r
     using Caliburn.Micro;\r
@@ -26,7 +25,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Add Preset View Model\r
     /// </summary>\r
-    [Export(typeof(IAddPresetViewModel))]\r
     public class AddPresetViewModel : ViewModelBase, IAddPresetViewModel\r
     {\r
         /// <summary>\r
index ffcfc5b4bcd0ffc3a0299f79fe329e2e2944a4b9..5cfa1f413423ec1d480eaf613e27ad994a2af169 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
     using System.Globalization;\r
     using System.Linq;\r
 \r
@@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Advanced View Model\r
     /// </summary>\r
-    [Export(typeof(IAdvancedViewModel))]\r
     public class AdvancedViewModel : ViewModelBase, IAdvancedViewModel\r
     {\r
         #region Constants and Fields\r
index 393702cb2d978735258daf3130511224c3815469..49504b6846edcd7ccebf231ece8e4d1d3fb4d853 100644 (file)
@@ -12,7 +12,6 @@ namespace HandBrakeWPF.ViewModels
     using System.Collections.Generic;\r
     using System.Collections.ObjectModel;\r
     using System.Collections.Specialized;\r
-    using System.ComponentModel.Composition;\r
     using System.Linq;\r
 \r
     using Caliburn.Micro;\r
@@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Audio View Model\r
     /// </summary>\r
-    [Export(typeof(IAudioViewModel))]\r
     public class AudioViewModel : ViewModelBase, IAudioViewModel\r
     {\r
         /// <summary>\r
index ee2cebe34c1b0d9b6413d47b33695623bf5505c3..69a8a5d053a287ff5515c2020c420f27aca76a67 100644 (file)
@@ -12,7 +12,6 @@ namespace HandBrakeWPF.ViewModels
     using System;\r
     using System.Collections.Generic;\r
     using System.Collections.ObjectModel;\r
-    using System.ComponentModel.Composition;\r
     using System.IO;\r
 \r
     using Caliburn.Micro;\r
@@ -30,7 +29,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Chapters View Model\r
     /// </summary>\r
-    [Export(typeof(IChaptersViewModel))]\r
     public class ChaptersViewModel : ViewModelBase, IChaptersViewModel\r
     {\r
         /// <summary>\r
index bed8806a479342ede3e242dfaecd736e8919aaa3..e6bbfe6d424c487805becc6ff240f7d3bc3f4c3a 100644 (file)
@@ -10,7 +10,6 @@
 namespace HandBrakeWPF.ViewModels\r
 {\r
     using System;\r
-    using System.ComponentModel.Composition;\r
     using System.Windows;\r
 \r
     using HandBrakeWPF.ViewModels.Interfaces;\r
@@ -18,7 +17,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Error View Model\r
     /// </summary>\r
-    [Export(typeof(IErrorViewModel))]\r
     public class ErrorViewModel : ViewModelBase, IErrorViewModel\r
     {\r
         #region Constants and Fields\r
index 50fe97f1c1829354d59829738102b34310e23f06..e99d2100a5e7224ef347ff76621df880a8b2b94d 100644 (file)
@@ -10,7 +10,6 @@
 namespace HandBrakeWPF.ViewModels\r
 {\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
 \r
     using Caliburn.Micro;\r
 \r
@@ -25,7 +24,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Filters View Model\r
     /// </summary>\r
-    [Export(typeof(IFiltersViewModel))]\r
     public class FiltersViewModel : ViewModelBase, IFiltersViewModel\r
     {\r
         #region Constructors and Destructors\r
index f262ea7e33d90dd3dc56118c603578a8ea1e94c5..340036373195f213dc7264c47a1cf77ec0081b38 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
     using System.Diagnostics;\r
     using System.IO;\r
     using System.Linq;\r
@@ -42,7 +41,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// HandBrakes Main Window\r
     /// </summary>\r
-    [Export(typeof(IMainViewModel))]\r
     public class MainViewModel : ViewModelBase, IMainViewModel\r
     {\r
         #region Private Variables and Services\r
@@ -194,7 +192,6 @@ namespace HandBrakeWPF.ViewModels
         /// <param name="driveDetectService">\r
         /// The drive Detect Service.\r
         /// </param>\r
-        [ImportingConstructor]\r
         public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,\r
             IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, IDriveDetectService driveDetectService)\r
         {\r
index 7036240cd74e8f44dc3d275cd20995127c21673b..119cb9d10870e92944126b29047857ccc57b0fb3 100644 (file)
@@ -13,7 +13,6 @@ namespace HandBrakeWPF.ViewModels
     using System.Collections.Generic;\r
     using System.Collections.Specialized;\r
     using System.ComponentModel;\r
-    using System.ComponentModel.Composition;\r
     using System.Diagnostics;\r
     using System.Globalization;\r
     using System.IO;\r
@@ -35,7 +34,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Options View Model\r
     /// </summary>\r
-    [Export(typeof(IOptionsViewModel))]\r
     public class OptionsViewModel : ViewModelBase, IOptionsViewModel\r
     {\r
         #region Constants and Fields\r
index 2c879ff5817821fb9cd19665f93b9c218736479a..7bca93ced4c9603cea0cacd975dfca8c2299ce01 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
     using System.Drawing;\r
 \r
     using Caliburn.Micro;\r
@@ -26,7 +25,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Picture Settings View Model\r
     /// </summary>\r
-    [Export(typeof(IPictureSettingsViewModel))]\r
     public class PictureSettingsViewModel : ViewModelBase, IPictureSettingsViewModel\r
     {\r
         /*\r
index badb64e17d060b3293c90ba8c037382ac4c1e74c..82f3b30f48b7cc3692486877dd0831a9c48ccd68 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.ObjectModel;\r
-    using System.ComponentModel.Composition;\r
     using System.Windows;\r
 \r
     using Caliburn.Micro;\r
@@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Preview View Model\r
     /// </summary>\r
-    [Export(typeof(IQueueViewModel))]\r
     public class QueueViewModel : ViewModelBase, IQueueViewModel\r
     {\r
         #region Constants and Fields\r
index adb1f587bb586a7e29da68d8d6d469af09ccc281..2633b58857398802f9bed3576cd20b0580663f87 100644 (file)
@@ -9,7 +9,6 @@
 \r
 namespace HandBrakeWPF.ViewModels\r
 {\r
-    using System.ComponentModel.Composition;\r
     using System.Windows;\r
 \r
     using Caliburn.Micro;\r
@@ -23,7 +22,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Shell View Model\r
     /// </summary>\r
-    [Export(typeof(IShellViewModel))]\r
     public class ShellViewModel : ViewModelBase, IShellViewModel\r
     {\r
         /// <summary>\r
index 8d6dafb2c5f182ebff3af844a039c1d4822a8451..446fab6cfe0fbfda15da91415689af31b16562bf 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System.Collections.Generic;\r
     using System.Collections.Specialized;\r
-    using System.ComponentModel.Composition;\r
     using System.IO;\r
     using System.Linq;\r
 \r
@@ -30,7 +29,6 @@ namespace HandBrakeWPF.ViewModels
     /// <summary>\r
     /// The Subtitles View Model\r
     /// </summary>\r
-    [Export(typeof(ISubtitlesViewModel))]\r
     public class SubtitlesViewModel : ViewModelBase, ISubtitlesViewModel\r
     {\r
         #region Constants and Fields\r
index 06055dff1ab27f1e0cb93ca76c9e89188069a324..836a7b0aa5eb9de787a48fd8e0975357fbd83a0f 100644 (file)
@@ -9,14 +9,11 @@
 \r
 namespace HandBrakeWPF.ViewModels\r
 {\r
-    using System.ComponentModel.Composition;\r
-\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     /// <summary>\r
     /// The Title Specific View Model\r
     /// </summary>\r
-    [Export(typeof(ITitleSpecificViewModel))]\r
     public class TitleSpecificViewModel : ViewModelBase, ITitleSpecificViewModel\r
     {\r
         #region Constants and Fields\r
index d066f7ea275abd61227ad575668b15a9c9ececf8..8468f26da6640740ffdaa5ee7f62786c2f0b77e9 100644 (file)
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using System;\r
     using System.Collections.Generic;\r
-    using System.ComponentModel.Composition;\r
     using System.Globalization;\r
 \r
     using Caliburn.Micro;\r
@@ -23,14 +22,12 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Services.Interfaces;\r
     using HandBrake.ApplicationServices.Utilities;\r
     using HandBrake.Interop.Model.Encoding;\r
-    using HandBrake.Interop.Model.Encoding.x264;\r
 \r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     /// <summary>\r
     /// The Video View Model\r
     /// </summary>\r
-    [Export(typeof(IVideoViewModel))]\r
     public class VideoViewModel : ViewModelBase, IVideoViewModel\r
     {\r
         #region Constants and Fields\r
index ac9098bac65b5e198a7ebafa15d1773bfe52fc16..f1766741e933fd51a28d0c6615fd4bc3e84e0a5c 100644 (file)
@@ -13,7 +13,6 @@ namespace HandBrakeWPF.ViewModels
 \r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
-    using HandBrakeWPF.Services.Interfaces;\r
     using HandBrakeWPF.ViewModels.Interfaces;\r
 \r
     /// <summary>\r