This project is read-only.
1
Vote

How the Castle work in the MvcCms pro?

description

when I see the Global.ascx.cs code :
_container = ContainerBuilder.Build("Ioc/Configuration/Windsor.Config");/**/
            ServiceLocator.SetLocatorProvider(()=>_container.Resolve<IServiceLocator>());
            _container.Register(Component.For<IWindsorContainer>().Instance(_container));
            _container.Register(Component.For<IActionInvoker>().ImplementedBy<WindsorActionInvoker>());
I realy can't understand that "ServiceLocator.SetLocatorProvider(()=>_container.Resolve<IServiceLocator>());" the code do what?
what's the function of the code.

comments