Skip to content

Instantly share code, notes, and snippets.

View gabrielfuller's full-sized avatar

Gabriel Fuller gabrielfuller

View GitHub Profile
@gabrielfuller
gabrielfuller / ComponentRegistrar.cs
Created October 25, 2011 20:23
Save Option Command Issues
using SharpArch.Web.Mvc.Castle;
namespace EasyOptions.Web.Mvc.CastleWindsor
{
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using SharpArch.Domain.PersistenceSupport;
using SharpArch.NHibernate;
using SharpArch.NHibernate.Contracts.Repositories;
@gabrielfuller
gabrielfuller / Global.asax.cs
Created January 26, 2012 12:14
Quartz.net Integration with Windsor Castle and Asp.net MVC 3
protected virtual void InitializeServiceLocator()
{
var container = new WindsorContainer(new XmlInterpreter());
container.AddFacility("quartznet", new QuartzFacility());
//Get All Controller Instances in Assembly and Add to IWindsorContainer
ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(container));
var controllerTypes = (from t in Assembly.GetAssembly(typeof (BaseController)).GetExportedTypes()
where typeof (IController).IsAssignableFrom(t)
select t).ToArray();