public ScoreServiceTest() { var kernel = NinjectRegistrator.GetKernel("test"); _scoresService = kernel.Get <IScoresService>(); _userService = kernel.Get <IUserService>(); }
static BasePresenter() { var kernel = NinjectRegistrator.GetKernel(); UserService = kernel.Get <IUserService>(); ScoresService = kernel.Get <IScoresService>(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); var registrator = new NinjectRegistrator(); var kernel = new StandardKernel(registrator); DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel)); }
public UserServiceTest() { var kernel = NinjectRegistrator.GetKernel("test"); _service = kernel.Get <IUserService>(); }
public UserRepositoryTest() { var kernel = NinjectRegistrator.GetKernel("test"); _repository = kernel.Get <IUserRepository>(); }
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); }