示例#1
0
        protected override IServiceProvider CreateContainer(IServiceProvider fallbackProvider)
        {
            IKernel kernel = new StandardKernel();

            NinjectRegistration.Populate(kernel, TestServices.DefaultServices(), fallbackProvider);

            return(kernel.Get <IServiceProvider>());
        }
示例#2
0
        protected override void Configure()
        {
            var config            = CreateConfig(Environment.GetCommandLineArgs());
            var serviceCollection = CreateServiceCollection(config);

            NinjectRegistration.Populate(_container, serviceCollection);

            AugmentViewTypeLocator(ref ViewLocator.LocateTypeForModelType, FindProxy);
            base.Configure();
        }