From 60bf93c65e36a456e35eb7556a59acca281a282e Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 27 Aug 2012 18:35:56 +0000 Subject: [PATCH] WinGui: Strip out the last traces of MEF since it's not going to be used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4920 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 2 - .../HandBrakeWPF/Startup/MefBootstrapper.cs | 98 ------------------- .../HandBrakeWPF/ViewModels/AboutViewModel.cs | 3 - .../ViewModels/AddPresetViewModel.cs | 2 - .../ViewModels/AdvancedViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/AudioViewModel.cs | 2 - .../ViewModels/ChaptersViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/ErrorViewModel.cs | 2 - .../ViewModels/FiltersViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/MainViewModel.cs | 3 - .../ViewModels/OptionsViewModel.cs | 2 - .../ViewModels/PictureSettingsViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/QueueViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/ShellViewModel.cs | 2 - .../ViewModels/SubtitlesViewModel.cs | 2 - .../ViewModels/TitleSpecificViewModel.cs | 3 - .../HandBrakeWPF/ViewModels/VideoViewModel.cs | 3 - .../HandBrakeWPF/ViewModels/ViewModelBase.cs | 1 - 18 files changed, 135 deletions(-) delete mode 100644 win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index d3682caeb..f6bb499b0 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -92,7 +92,6 @@ - @@ -169,7 +168,6 @@ - diff --git a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs deleted file mode 100644 index 730081af7..000000000 --- a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// The MEF Bootstrapper (Not Used) -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Startup -{ - using System; - using System.Collections.Generic; - using System.ComponentModel.Composition; - using System.ComponentModel.Composition.Hosting; - using System.Linq; - - using Caliburn.Micro; - - using HandBrakeWPF.ViewModels.Interfaces; - - /// - /// The MEF Bootstrapper (Not Used) - /// - public class MefBootstrapper : Bootstrapper - { - /// - /// The Backing field for the container - /// - private CompositionContainer container; - - /// - /// MEF Configure - /// - protected override void Configure() - { - container = new CompositionContainer( - new AggregateCatalog(AssemblySource.Instance.Select(x => new AssemblyCatalog(x))) - ); - - var batch = new CompositionBatch(); - - batch.AddExportedValue(new WindowManager()); - batch.AddExportedValue(new EventAggregator()); - batch.AddExportedValue(container); - - container.Compose(batch); - } - - /// - /// Get an Instance of a service - /// - /// - /// The service. - /// - /// - /// The key. - /// - /// - /// The Service Requested - /// - protected override object GetInstance(Type serviceType, string key) - { - string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key; - var exports = container.GetExportedValues(contract); - - if (exports.Count() > 0) - return exports.First(); - - throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract)); - } - - /// - /// Get all instances of a service - /// - /// - /// The service. - /// - /// - /// A collection of instances of the requested service type. - /// - protected override IEnumerable GetAllInstances(Type serviceType) - { - return container.GetExportedValues(AttributedModelServices.GetContractName(serviceType)); - } - - /// - /// Build Up - /// - /// - /// The instance. - /// - protected override void BuildUp(object instance) - { - container.SatisfyImportsOnce(instance); - } - } -} \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs index e506fb987..e261062b5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs @@ -9,8 +9,6 @@ namespace HandBrakeWPF.ViewModels { - using System.ComponentModel.Composition; - using Caliburn.Micro; using HandBrake.ApplicationServices; @@ -21,7 +19,6 @@ namespace HandBrakeWPF.ViewModels /// /// The About View Model /// - [Export(typeof(IAboutViewModel))] public class AboutViewModel : ViewModelBase, IAboutViewModel { /// diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 69caa66dc..00d6652b6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -10,7 +10,6 @@ namespace HandBrakeWPF.ViewModels { using System.Collections.Generic; - using System.ComponentModel.Composition; using System.Windows; using Caliburn.Micro; @@ -26,7 +25,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Add Preset View Model /// - [Export(typeof(IAddPresetViewModel))] public class AddPresetViewModel : ViewModelBase, IAddPresetViewModel { /// diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index ffcfc5b4b..5cfa1f413 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.Generic; - using System.ComponentModel.Composition; using System.Globalization; using System.Linq; @@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Advanced View Model /// - [Export(typeof(IAdvancedViewModel))] public class AdvancedViewModel : ViewModelBase, IAdvancedViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index 393702cb2..49504b684 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -12,7 +12,6 @@ namespace HandBrakeWPF.ViewModels using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; - using System.ComponentModel.Composition; using System.Linq; using Caliburn.Micro; @@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Audio View Model /// - [Export(typeof(IAudioViewModel))] public class AudioViewModel : ViewModelBase, IAudioViewModel { /// diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index ee2cebe34..69a8a5d05 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -12,7 +12,6 @@ namespace HandBrakeWPF.ViewModels using System; using System.Collections.Generic; using System.Collections.ObjectModel; - using System.ComponentModel.Composition; using System.IO; using Caliburn.Micro; @@ -30,7 +29,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Chapters View Model /// - [Export(typeof(IChaptersViewModel))] public class ChaptersViewModel : ViewModelBase, IChaptersViewModel { /// diff --git a/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs index bed8806a4..e6bbfe6d4 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs @@ -10,7 +10,6 @@ namespace HandBrakeWPF.ViewModels { using System; - using System.ComponentModel.Composition; using System.Windows; using HandBrakeWPF.ViewModels.Interfaces; @@ -18,7 +17,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Error View Model /// - [Export(typeof(IErrorViewModel))] public class ErrorViewModel : ViewModelBase, IErrorViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 50fe97f1c..e99d2100a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -10,7 +10,6 @@ namespace HandBrakeWPF.ViewModels { using System.Collections.Generic; - using System.ComponentModel.Composition; using Caliburn.Micro; @@ -25,7 +24,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Filters View Model /// - [Export(typeof(IFiltersViewModel))] public class FiltersViewModel : ViewModelBase, IFiltersViewModel { #region Constructors and Destructors diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index f262ea7e3..340036373 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.Generic; - using System.ComponentModel.Composition; using System.Diagnostics; using System.IO; using System.Linq; @@ -42,7 +41,6 @@ namespace HandBrakeWPF.ViewModels /// /// HandBrakes Main Window /// - [Export(typeof(IMainViewModel))] public class MainViewModel : ViewModelBase, IMainViewModel { #region Private Variables and Services @@ -194,7 +192,6 @@ namespace HandBrakeWPF.ViewModels /// /// The drive Detect Service. /// - [ImportingConstructor] public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService, IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, IDriveDetectService driveDetectService) { diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 7036240cd..119cb9d10 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -13,7 +13,6 @@ namespace HandBrakeWPF.ViewModels using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; - using System.ComponentModel.Composition; using System.Diagnostics; using System.Globalization; using System.IO; @@ -35,7 +34,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Options View Model /// - [Export(typeof(IOptionsViewModel))] public class OptionsViewModel : ViewModelBase, IOptionsViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 2c879ff58..7bca93ced 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.Generic; - using System.ComponentModel.Composition; using System.Drawing; using Caliburn.Micro; @@ -26,7 +25,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Picture Settings View Model /// - [Export(typeof(IPictureSettingsViewModel))] public class PictureSettingsViewModel : ViewModelBase, IPictureSettingsViewModel { /* diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index badb64e17..82f3b30f4 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.ObjectModel; - using System.ComponentModel.Composition; using System.Windows; using Caliburn.Micro; @@ -29,7 +28,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Preview View Model /// - [Export(typeof(IQueueViewModel))] public class QueueViewModel : ViewModelBase, IQueueViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index adb1f587b..2633b5885 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -9,7 +9,6 @@ namespace HandBrakeWPF.ViewModels { - using System.ComponentModel.Composition; using System.Windows; using Caliburn.Micro; @@ -23,7 +22,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Shell View Model /// - [Export(typeof(IShellViewModel))] public class ShellViewModel : ViewModelBase, IShellViewModel { /// diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 8d6dafb2c..446fab6cf 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System.Collections.Generic; using System.Collections.Specialized; - using System.ComponentModel.Composition; using System.IO; using System.Linq; @@ -30,7 +29,6 @@ namespace HandBrakeWPF.ViewModels /// /// The Subtitles View Model /// - [Export(typeof(ISubtitlesViewModel))] public class SubtitlesViewModel : ViewModelBase, ISubtitlesViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/TitleSpecificViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/TitleSpecificViewModel.cs index 06055dff1..836a7b0aa 100644 --- a/win/CS/HandBrakeWPF/ViewModels/TitleSpecificViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/TitleSpecificViewModel.cs @@ -9,14 +9,11 @@ namespace HandBrakeWPF.ViewModels { - using System.ComponentModel.Composition; - using HandBrakeWPF.ViewModels.Interfaces; /// /// The Title Specific View Model /// - [Export(typeof(ITitleSpecificViewModel))] public class TitleSpecificViewModel : ViewModelBase, ITitleSpecificViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index d066f7ea2..8468f26da 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels { using System; using System.Collections.Generic; - using System.ComponentModel.Composition; using System.Globalization; using Caliburn.Micro; @@ -23,14 +22,12 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.ApplicationServices.Utilities; using HandBrake.Interop.Model.Encoding; - using HandBrake.Interop.Model.Encoding.x264; using HandBrakeWPF.ViewModels.Interfaces; /// /// The Video View Model /// - [Export(typeof(IVideoViewModel))] public class VideoViewModel : ViewModelBase, IVideoViewModel { #region Constants and Fields diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs index ac9098bac..f1766741e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs @@ -13,7 +13,6 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Services.Interfaces; - using HandBrakeWPF.Services.Interfaces; using HandBrakeWPF.ViewModels.Interfaces; /// -- 2.40.0