public CQRSService( IGamePlayEngine gamePlayEngine, IGamePlayListener gamePlayListener, IReadCacheDataRepository readCacheDataRepository, IGameDataRepository gameDataRepository, ICqrsLogicHandler logicHandler, IEventPublisher eventPublisher, IComponentContext componentContext, ILogFactory logFactory ) : base(componentContext, logFactory) { _gamePlayEngine = gamePlayEngine; _gamePlayListener = gamePlayListener; _readCacheDataRepository = readCacheDataRepository; _gameDataRepository = gameDataRepository; _logicHandler = logicHandler; _handlers.AddRange( componentContext.ResolveAll <IHttpRequestHandler>() ); _log = logFactory.CreateForType(this); // Subscribe myself to any event eventPublisher.Attach(this); }
public static void ShouldUpdateLoginDataToDbCorrectly() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true); ILoginData loginData = MockData.GetILoginData(); // Act _gameDataRepository.UpdateLoginData(loginData); using (var db = MockData.GetDbContext()) { var characterList = db.Characters.ToList(); Assert.NotNull(characterList.FirstOrDefault( x => x.CharacterId == 999888 && x.CharacterName == "FAKENAME" && x.WorldId == "nl33")); Assert.NotNull(characterList.FirstOrDefault( x => x.CharacterId == 999888 && x.CharacterName == "FAKENAME" && x.WorldId == "nl35")); Assert.NotNull(characterList.FirstOrDefault( x => x.CharacterId == 999888 && x.CharacterName == "FAKENAME" && x.WorldId == "nl37")); } }
public LanguageService(IGameDataRepository <XIVData.Model.Language> repository, IFFXIVACTPluginWrapper ffxivACTPluginWrapper, ACTConfig actConfig) { _repository = repository; _languages = MapToLanguages(_repository.GetAll().ToList()); _ffxivACTPluginWrapper = ffxivACTPluginWrapper; _actConfig = actConfig; }
public PlayerController( IRESTFulGameEngineListener gameEngineListener, IGameDataRepository gameDataRepository ) { _gameEngineListener = gameEngineListener; _gameDataRepository = gameDataRepository; }
public AddPlayerCommandHandler( IGameDataRepository gameDataRepository, ILogFactory logFactory ) { _gameDataRepository = gameDataRepository; _log = logFactory.CreateForType(this); }
public GameDataService( IGameDataRepository gameDataRepository, IGameRoundRepository gameRoundRepository, GameDataMapper gameDataMapper) { _gameDataRepository = gameDataRepository; _gameRoundRepository = gameRoundRepository; _gameDataMapper = gameDataMapper; }
public GameRoundService( IGameRoundRepository gameRoundRepository, IArchivalGameRoundRepository archivalGameRoundRepository, IGameDataRepository gameDataRepository) { _gameRoundRepository = gameRoundRepository; _archivalGameRoundRepository = archivalGameRoundRepository; _gameDataRepository = gameDataRepository; }
public LocationService(IGameDataManager gameDataManager, IFFXIVACTPluginWrapper ffxivACTPluginWrapper) { _territoryTypeRepository = new GameDataRepository <TerritoryType>(gameDataManager.TerritoryType); _placeNameRepository = new GameDataRepository <XIVData.Model.PlaceName>(gameDataManager.PlaceName); _mapRepository = new GameDataRepository <Map>(gameDataManager.Map); _ffxivACTPluginWrapper = ffxivACTPluginWrapper; }
public LayoutService( ILogParser logParser, IGameDataRepository gameDataRepository, IImageDataRepository imageDataRepository) { _logParser = logParser; _gameDataRepository = gameDataRepository; _imageDataRepository = imageDataRepository; _history = new History(); }
public GameDataService(IGameDataRepository gameDataRepository, ILeagueRepository leagueRepository, IScheduleGameRepository scheduleGameRepository, ICompetitionRepository competitionRepository, ICompetitionConfigRepository competitionConfigRepository, ITeamService teamServ, ICompetitionService compService) { gameDataRepo = gameDataRepository; leagueRepo = leagueRepository; scheduleGameRepo = scheduleGameRepository; competitionRepo = competitionRepository; competitionConfigRepo = competitionConfigRepository; teamService = teamServ; competitionService = compService; }
public static void ShouldInsertAndUpdateVillages() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(); List <IVillage> villages = MockData.GetCharacterVillages(); //Act bool result1 = _gameDataRepository.UpdateVillages(villages); bool result2 = _gameDataRepository.UpdateVillages(villages); //Assert Assert.True(result1); Assert.True(result2); }
public ConnectionWindowViewModel( IDataManager dataManager, ISocketManager socketManager, IGameDataRepository gameDataRepository) { _dataManager = dataManager; _socketManager = socketManager; _gameDataRepository = gameDataRepository; _settings = dataManager.Settings; ConnectCommand = new RelayCommand(StartConnection); DisconnectCommand = new RelayCommand(StopConnection); ClearCommand = new RelayCommand(ClearConnectionLog); CloseCommand = new RelayCommand(() => CloseRequested?.Invoke(this, new DialogCloseRequestedEventArgs())); }
public ConsoleService( IGamePlayEngine gamePlayEngine, IGamePlayListener gamePlayListener, IReadCacheDataRepository readCacheDataRepository, IGameDataRepository gameDataRepository, ICqrsLogicHandler logicHandler, IComponentContext componentContext, ILogFactory logFactory ) : base(componentContext, logFactory) { _gamePlayEngine = gamePlayEngine; _gamePlayListener = gamePlayListener; _readCacheDataRepository = readCacheDataRepository; _gameDataRepository = gameDataRepository; _logicHandler = logicHandler; _log = logFactory.CreateForType(this); }
public TeamApplication() { leagueRepository = new LeagueRepository(new RepositoryNHibernate <League>()); teamRepository = new TeamRepository(new RepositoryNHibernate <Team>()); competitionRepository = new CompetitionRepository(new RepositoryNHibernate <Competition>()); standingsRepository = new StandingsRepository(new RepositoryNHibernate <SeasonTeam>(), competitionRepository); teamRankingRepository = new TeamRankingRepository(new RepositoryNHibernate <TeamRanking>()); scheduleGameRepository = new ScheduleGameRepository(new RepositoryNHibernate <ScheduleGame>()); gameDataRepository = new GameDataRepository(new RepositoryNHibernate <GameData>()); competitionConfigRepository = new CompetitionConfigRepository(new RepositoryNHibernate <CompetitionConfig>()); seasonRepository = new SeasonRepository(new RepositoryNHibernate <Season>()); competitionTeamRepository = new CompetitionTeamRepository(new RepositoryNHibernate <CompetitionTeam>()); LeagueService = new LeagueService(leagueRepository); StandingsService = new StandingsService(standingsRepository, competitionRepository); TeamService = new TeamService(teamRepository); GameDataService = new GameDataService(gameDataRepository, leagueRepository, scheduleGameRepository, competitionRepository, competitionConfigRepository, TeamService, CompetitionService); ScheduleGameService = new ScheduleGameService(scheduleGameRepository); CompetitionService = new CompetitionService(competitionRepository); PlayoffService = new PlayoffService(competitionRepository); }
public GamePlayEngine( IAcceleratedClock clock, StartableThread startableThread, IGameDataRepository gameDataRepository, IAppSettings appSettings, IRandom random, ILogFactory logFactory ) { _clock = clock; _startableThread = startableThread; _gameDataRepository = gameDataRepository; _appSettings = appSettings; _random = random; _log = logFactory.CreateForType(this); // Define parameters for the background thread _startableThread.Name = "GameEngine"; _startableThread.ThreadLatency = TimeSpan.FromMilliseconds(250); _startableThread.ThreadLoop = RunEngine; }
public static async void CheckCredentialsWithValidAndInValidAndReturnTrue() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true); Account wrongAccount = new Account { Username = new Bogus.DataSets.Hacker().Phrase(), Password = new Bogus.DataSets.Hacker().Phrase(), OnServerId = "en" }; Account validAccount = SecretData.GetValidTestAccount(); //Act ConnectResult result1 = await _gameDataRepository.TestAccountASync(wrongAccount); ConnectResult result2 = await _gameDataRepository.TestAccountASync(validAccount); //Assert Assert.False(result1.IsConnected); Assert.True(result2.IsConnected); }
public static async void FullTW2DataHarvest() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true); Account account = SecretData.GetValidTestAccount(); //Act _gameDataRepository.InsertOrUpdateAccount(account); await _gameDataRepository.TestAccountASync(account); Account foundAccount = _gameDataRepository.GetAccount(account.Id); //Assert Assert.NotNull(foundAccount); Assert.NotNull(foundAccount.TW2AccountID); //Act var result = await _gameDataRepository.EstablishConnection(foundAccount); //Assert Assert.True(result); }
public DataManager(IGameDataRepository gameDataRepository, IMapper mapper) { _gameDataRepository = gameDataRepository; _mapper = mapper; string path = $"{AppDomain.CurrentDomain.BaseDirectory}{_settings.FileName}"; if (!File.Exists(path)) { _settings = JsonSettings.Construct <Settings>(); _settings.SetDefaultValues(); _settings.Save(); } try { _settings = JsonSettings.Load <Settings>(_settings.FileName); } catch (Exception e) { Debug.WriteLine(e); } }
public ItemService(IGameDataRepository <XIVData.Model.Item> itemRepository, IGameDataRepository <ItemAction> itemActionRepository) { _itemRepository = itemRepository; _itemActionRepository = itemActionRepository; }
public void DeInit() { _repository = null; }
public GameDataService(IGameDataRepository gameDataRepository, IGamePaths gamePaths, ILinkerFactory linkerFactory) { _gameDataRepository = gameDataRepository; _gamePaths = gamePaths; _linkerFactory = linkerFactory; }
public ScoreController( IGameDataRepository gameDataRepository ) { _gameDataRepository = gameDataRepository; }
public ContentService(IReadOnlyCollection <Zone> pluginZones, IGameDataRepository <ContentFinderCondition> repository) { _repository = repository; _pluginZones = pluginZones; }
public WorldService(IGameDataRepository <XIVData.Model.World> repository) { _repository = repository; }
public ClassJobService(IGameDataRepository <XIVData.Model.ClassJob> repository) { _repository = repository; }