Created
September 30, 2011 15:03
-
-
Save alecwhittington/1254013 to your computer and use it in GitHub Desktop.
ServiceLocatorInitializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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