BellaCodeAir.NinjectRoot.RegisterWithCommonServiceLocator C# (CSharp) Method

RegisterWithCommonServiceLocator() private static method

private static RegisterWithCommonServiceLocator ( IKernel kernel ) : void
kernel IKernel
return void
        private static void RegisterWithCommonServiceLocator(IKernel kernel)
        {
            kernel.Bind<NinjectServiceLocator>().ToMethod(c => new NinjectServiceLocator(kernel)).InSingletonScope();
            Microsoft.Practices.ServiceLocation.ServiceLocator.SetLocatorProvider(() => kernel.Get<NinjectServiceLocator>());
        }