Skip to content

Instantly share code, notes, and snippets.

@alecwhittington
Created September 30, 2011 15:03
Show Gist options
  • Save alecwhittington/1254013 to your computer and use it in GitHub Desktop.
Save alecwhittington/1254013 to your computer and use it in GitHub Desktop.
ServiceLocatorInitializer
public class ServiceLocatorInitializer
{
#region Public Methods
public static void Init()
{
IWindsorContainer container = new WindsorContainer();
container.AddComponent("validator", typeof(IValidator), typeof(ValidatorStub));
container.AddComponent("validatorManager", typeof(IValidationManager), typeof(ValidationManagerStub));
ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(container));
}
#endregion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment