summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-10-22 21:26:28 +0000
committersr55 <[email protected]>2011-10-22 21:26:28 +0000
commit4e0db6ec1bfa440ef7f142e84ad064affbd64490 (patch)
tree02cb20d37fa5bf10329cf14b1b81b0be8249a498 /win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
parent16ab8ff2bf50476537c9755b2c1670cc25da80b6 (diff)
WinGui: (WPF) Added backing properties for binding on the options window & some general tidy up of the code/comments.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4310 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs')
-rw-r--r--win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs44
1 files changed, 43 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
index 02710b161..695e0c7c1 100644
--- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
+++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
@@ -1,4 +1,13 @@
-namespace HandBrakeWPF.Startup
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CastleBootstrapper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Castle Bootstrapper
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Startup
{
using System;
using System.Collections.Generic;
@@ -43,21 +52,54 @@
this.windsorContainer.Register(Component.For<IMainViewModel>().ImplementedBy<MainViewModel>().LifeStyle.Is(LifestyleType.Singleton));
}
+ /// <summary>
+ /// Select Assemblies
+ /// </summary>
+ /// <returns>
+ /// A List of Assembly objects
+ /// </returns>
protected override IEnumerable<Assembly> SelectAssemblies()
{
return AppDomain.CurrentDomain.GetAssemblies();
}
+ /// <summary>
+ /// Get an Instance of a service
+ /// </summary>
+ /// <param name="service">
+ /// The service.
+ /// </param>
+ /// <param name="key">
+ /// The key.
+ /// </param>
+ /// <returns>
+ /// The Service Requested
+ /// </returns>
protected override object GetInstance(Type service, string key)
{
return string.IsNullOrWhiteSpace(key) ? this.windsorContainer.Resolve(service) : this.windsorContainer.Resolve(key, new { });
}
+ /// <summary>
+ /// Get all instances of a service
+ /// </summary>
+ /// <param name="service">
+ /// The service.
+ /// </param>
+ /// <returns>
+ /// A collection of instances of the requested service type.
+ /// </returns>
protected override IEnumerable<object> GetAllInstances(Type service)
{
return this.windsorContainer.ResolveAll(service).Cast<object>();
}
+ /// <summary>
+ /// Build Up
+ /// </summary>
+ /// <param name="instance">
+ /// The instance.
+ /// </param>
protected override void BuildUp(object instance)
{
instance.GetType().GetProperties()