예제 #1
0
        public ScoreServiceTest()
        {
            var kernel = NinjectRegistrator.GetKernel("test");

            _scoresService = kernel.Get <IScoresService>();
            _userService   = kernel.Get <IUserService>();
        }
예제 #2
0
        static BasePresenter()
        {
            var kernel = NinjectRegistrator.GetKernel();

            UserService   = kernel.Get <IUserService>();
            ScoresService = kernel.Get <IScoresService>();
        }
예제 #3
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            var registrator = new NinjectRegistrator();
            var kernel      = new StandardKernel(registrator);

            DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel));
        }
예제 #4
0
        public UserServiceTest()
        {
            var kernel = NinjectRegistrator.GetKernel("test");

            _service = kernel.Get <IUserService>();
        }
예제 #5
0
        public UserRepositoryTest()
        {
            var kernel = NinjectRegistrator.GetKernel("test");

            _repository = kernel.Get <IUserRepository>();
        }
예제 #6
0
 public ScoresService(string databaseName = "database")
 {
     _repository = NinjectRegistrator.GetKernel(databaseName).Get <IUserRepository>();
 }
 /// <summary>
 /// Load your modules or register your services here!
 /// </summary>
 /// <param name="kernel">The kernel.</param>
 private static void RegisterServices(IKernel kernel)
 {
     NinjectRegistrator.Register(kernel);
 }