public void TestInitialize() { _userRetriever = new Mock<IUserRetriever>(); _userStatsRetriever = new Mock<IUserStatsRetriever>(); _userSaver = new Mock<IUserSaver>(); _userId = Guid.NewGuid(); _userlevelService = new UserLevelService(_userRetriever.Object, _userStatsRetriever.Object, _userSaver.Object); }
public DocTypeController(IDocTypeService docTypeService, ILocalizationService localizationService, IOwnerService ownerService, IOwnerLevelService ownerLevelService, IDocCategoryService docCategoryService, IUserLevelService userLevelService) { _docTypeService = docTypeService; _localizationService = localizationService; _ownerService = ownerService; _ownerLevelService = ownerLevelService; _docCategoryService = docCategoryService; _userLevelService = userLevelService; UserID = SILAuthorization.GetUserID(); }
public void RegisterExperience(IUserLevelService levelService, int points) { var totalPoints = ExperiencePoints + points; RaiseEvent(new UserGainedExperience(Id, points, totalPoints)); var level = levelService.CalcLevel(totalPoints); if (level.Level != Level.Level) { RaiseEvent(new UserGainedLevel(Id, level)); } }
public UsersController() { _zombiePackRetriever = MvcApplication.DependancyInjection.Resolve<IZombiePackRetriever>(); _hotZoneRetriever = MvcApplication.DependancyInjection.Resolve<IHotZoneRetriever>(); _userRetriever = MvcApplication.DependancyInjection.Resolve<IUserRetriever>(); _userSaver = MvcApplication.DependancyInjection.Resolve<IUserSaver>(); _userHotZoneProgressRetriever = MvcApplication.DependancyInjection.Resolve<IUserZombiePackProgressRetriever>(); _userItemRetriever = MvcApplication.DependancyInjection.Resolve<IUserItemRetriever>(); _distanceCalculator = MvcApplication.DependancyInjection.Resolve<IDistanceCalculator>(); _userEnergyProvider = MvcApplication.DependancyInjection.Resolve<IUserEnergyProvider>(); _userMover = MvcApplication.DependancyInjection.Resolve<IUserMoveDirector>(); _shopDirector = MvcApplication.DependancyInjection.Resolve<IShopDirector>(); _userAttackPowerProvider = MvcApplication.DependancyInjection.Resolve<IUserAttackPowerProvider>(); _userSightRadiusProvider = MvcApplication.DependancyInjection.Resolve<IUserSightRadiusProvider>(); _itemUsageDirector = MvcApplication.DependancyInjection.Resolve<IItemUsageDirector>(); _achievementProvider = MvcApplication.DependancyInjection.Resolve<IAchievementProvider>(); _userLevelService = MvcApplication.DependancyInjection.Resolve<IUserLevelService>(); _userCountsRetriever = MvcApplication.DependancyInjection.Resolve<IUserCountsRetriever>(); }
public HuntDirector(IUserRetriever userRetriever, IZombiePackRetriever zombiePackRetriever, IUserEnergyProvider userEnergyProvider, IUserSaver userSaver, IUserZombiePackProgressSaver userZombiePackProgressSaver, IUserAttackPowerProvider userAttackPowerProvider, IZombiePackDifficultyDirector zombiePackDifficultyDirector, IRandomNumberProvider randomNumberProvider, IUserLevelService userLevelService, IUserCountsSaver userCountsSaver, IHotZoneRetriever hotZoneRetriever) { _userRetriever = userRetriever; _zombiePackRetriever = zombiePackRetriever; _userEnergyProvider = userEnergyProvider; _userSaver = userSaver; _userZombiePackProgressSaver = userZombiePackProgressSaver; _userAttackPowerProvider = userAttackPowerProvider; _zombiePackDifficultyDirector = zombiePackDifficultyDirector; _randomNumberProvider = randomNumberProvider; _userLevelService = userLevelService; _userCountsSaver = userCountsSaver; _hotZoneRetriever = hotZoneRetriever; }
public BBSController(IBBSService bbsService, IUserLevelService userLevelService) { _bbsService = bbsService; _userLevelService = userLevelService; }
public UserLevelController(IUserLevelService userLevelService, ILocalizationService localizationService) { _userLevelService = userLevelService; _localizationService = localizationService; UserID = SILAuthorization.GetUserID(); }
public IntegralController(IUserLevelService levelService) { _levelService = levelService; }
private CommandDispatcher CreateCommandDispatcher(IDomainRepository domainRepository, IEventBus eventBus, IDateTimeProvider dateTimeProvider, IUserService userService, IUserLevelService levelService, IPlaceFinder placeFinder, IElevationService elevationService, IEnumerable <Action <ICommand> > preExecutionPipe, IEnumerable <Action <object> > postExecutionPipe) { var commandDispatcher = new CommandDispatcher(domainRepository, eventBus, preExecutionPipe, postExecutionPipe); var userCommandHandler = new UserCommandHandler(domainRepository, dateTimeProvider, levelService); commandDispatcher.RegisterHandler <CreateUser>(userCommandHandler); commandDispatcher.RegisterHandler <RegisterUserExperience>(userCommandHandler); commandDispatcher.RegisterHandler <UpdateUserSettings>(userCommandHandler); commandDispatcher.RegisterHandler <FollowUser>(userCommandHandler); commandDispatcher.RegisterHandler <UnfollowUser>(userCommandHandler); commandDispatcher.RegisterHandler <ClearFollowingUsers>(userCommandHandler); var profileCommandHandler = new ProfileCommandHandler(domainRepository, dateTimeProvider, userService, placeFinder, elevationService); commandDispatcher.RegisterHandler <CreateProfile>(profileCommandHandler); commandDispatcher.RegisterHandler <ChangeChart>(profileCommandHandler); commandDispatcher.RegisterHandler <RegisterProfileView>(profileCommandHandler); commandDispatcher.RegisterHandler <GiveKudos>(profileCommandHandler); commandDispatcher.RegisterHandler <DeleteProfile>(profileCommandHandler); return(commandDispatcher); }
public DomainEntry(IDomainRepository domainRepository, IEventBus eventBus, IDateTimeProvider dateTimeProvider, IUserService userService, IUserLevelService levelService, IPlaceFinder placeFinder, IElevationService elevationService, IEnumerable <Action <ICommand> > preExecutionPipe = null, IEnumerable <Action <object> > postExecutionPipe = null) { preExecutionPipe = preExecutionPipe ?? Enumerable.Empty <Action <ICommand> >(); postExecutionPipe = CreatePostExecutionPipe(postExecutionPipe); _commandDispatcher = CreateCommandDispatcher(domainRepository, eventBus, dateTimeProvider, userService, levelService, placeFinder, elevationService, preExecutionPipe, postExecutionPipe); _eventDispatcher = new EventDispatcher(domainRepository, eventBus); }
/// <summary> /// Initializes a new instance of the when_determining_if_user_gains_level class. /// </summary> public when_determining_if_user_gains_level() { _userLevelService = new UserLevelService(); _userSaver = new Mock<IUserSaver>(); }
public UserCommandHandler(IDomainRepository domainRepository, IDateTimeProvider dateTimeProvider, IUserLevelService levelService) { _domainRepository = domainRepository; _dateTimeProvider = dateTimeProvider; _levelService = levelService; }