diff options
author | sr55 <[email protected]> | 2011-03-11 19:35:20 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-03-11 19:35:20 +0000 |
commit | 8901833d80d4435650620a71956ee3101c5eb946 (patch) | |
tree | 6b1e459730079cedeef7e019a53c0e0d9c9b8303 /win/C#/HandBrakeWPF/Services/MefBootstrapper.cs | |
parent | 483648b11af3d0c9b3de4bfc6d7d4b6b0b125e1a (diff) |
WinGui:
- Update Caliburn to 2.0RC, update the current source files to work with the new version. Introduces MEF to the project.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3836 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrakeWPF/Services/MefBootstrapper.cs')
-rw-r--r-- | win/C#/HandBrakeWPF/Services/MefBootstrapper.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/win/C#/HandBrakeWPF/Services/MefBootstrapper.cs b/win/C#/HandBrakeWPF/Services/MefBootstrapper.cs new file mode 100644 index 000000000..bd05356c0 --- /dev/null +++ b/win/C#/HandBrakeWPF/Services/MefBootstrapper.cs @@ -0,0 +1,21 @@ +namespace HandBrakeWPF.Services
+{
+ using System.ComponentModel.Composition.Hosting;
+ using System.Linq;
+
+ using Caliburn.Core.InversionOfControl;
+ using Caliburn.MEF;
+ using Caliburn.PresentationFramework.ApplicationModel;
+
+ using HandBrakeWPF.ViewModels.Interfaces;
+
+ public class MefBootstrapper : Bootstrapper<IMainViewModel>
+ {
+ protected override IServiceLocator CreateContainer()
+ {
+ var container = new CompositionContainer(new AggregateCatalog(SelectAssemblies().Select(x => new AssemblyCatalog(x))));
+
+ return new MEFAdapter(container);
+ }
+ }
+}
\ No newline at end of file |