public void TestInitialize() { var gameDataManager = new GameDataManager(); var worldRepository = new GameDataRepository <XIVData.Model.World>(gameDataManager.World); _worldService = new WorldService(worldRepository); }
public Unit(int id) { _gameConfigCache = CallContext <GameConfigCache> .GetData("GameConfigCache"); _gameDataRepository = CallContext <GameDataRepository> .GetData("GameDataRepository"); _unitRecord = _gameDataRepository.GetUnitById(id); _gameDataRepository.UnitUpdated += UnitUpdated; }
public Faction(int factionId) { _gameConfigCache = CallContext <GameConfigCache> .GetData("GameConfigCache"); _gameDataRepository = CallContext <GameDataRepository> .GetData("GameDataRepository"); _factionRecord = _gameDataRepository.GetFactionById(factionId); _gameDataRepository.FactionUpdated += FactionUpdated; }
public void TestInitialize() { var language = new Language(1, "English", "en"); var gameDataManager = new GameDataManager(); IGameDataRepository <ContentFinderCondition> contentRepository = new GameDataRepository <ContentFinderCondition>(gameDataManager.ContentFinderCondition); var pluginZones = new FFXIVACTPluginWrapperMock().GetZoneList(); _contentService = new ContentService(pluginZones, contentRepository); _contentService.Initialize(language); }
public static IGameDataRepository GetIGameDataRepository(bool deleteDbBeforeStart = false) { IGameDataRepository _gameDataRepository = new GameDataRepository( GetISocketRepository(deleteDbBeforeStart), IoC.AutoMapperContainer); _gameDataRepository.IsInUnitTestMode = true; _gameDataRepository.DbContextOptions = GetDbContextOptions(); _gameDataRepository.DeleteDB(); return(_gameDataRepository); }
static Repository() { Repo = new GameDataRepository(); Repo.Add(new FactionRecord(0, 0, 0)); // Barbarians Repo.Add(new SettlementRecord(0, 1, new PointI(12, 9), "Testville")); Repo.Add(new StackRecord(1, new PointI(12, 9))); Repo.Add(new UnitRecord(100, 1)); Repo.Add(new StackRecord(1, new PointI(15, 7))); Repo.Add(new UnitRecord(0, 2)); Repo.Add(new StackRecord(1, new PointI(12, 9))); Repo.Add(new UnitRecord(1, 3)); }
public void TestInitialize() { var language = new Language(1, "English", "en"); var gameDataManager = new GameDataManager(); var languageRepository = new GameDataRepository <XIVData.Model.Language>(gameDataManager.Language); var languageService = new LanguageService(languageRepository, new FFXIVACTPluginWrapperMock(), new ACTConfig()); IGameDataRepository <XIVData.Model.ClassJob> classJobRepository = new GameDataRepository <XIVData.Model.ClassJob>(gameDataManager.ClassJob); _classJobService = new ClassJobService(classJobRepository); _classJobService.Initialize(language); }
public void Setup() { if (_repo != null) { return; } CallContext <GameConfigRepository> .SetData("GameConfigRepository", new GameConfigRepository()); _repo = new GameDataRepository(); _repo.Add(new FactionRecord(0, 0, 0)); _repo.Add(new StackRecord(1, PointI.Zero)); _repo.Add(new StackRecord(1, PointI.Zero)); }
public void TestInitialize() { var language = new Language(1, "English", "en"); var gameDataManager = new GameDataManager(); var languageRepository = new GameDataRepository <XIVData.Model.Language>(gameDataManager.Language); var languageService = new LanguageService(languageRepository, new FFXIVACTPluginWrapperMock(), new ACTConfig()); IGameDataRepository <XIVData.Model.Item> itemRepository = new GameDataRepository <XIVData.Model.Item>(gameDataManager.Item); var itemActionRepository = new GameDataRepository <ItemAction>(gameDataManager.ItemAction); _itemService = new ItemService(itemRepository, itemActionRepository); _itemService.Initialize(language); }
public Stack(int stackId) { _gameConfigCache = CallContext <GameConfigCache> .GetData("GameConfigCache"); _gameDataRepository = CallContext <GameDataRepository> .GetData("GameDataRepository"); _stackRecord = _gameDataRepository.GetStackById(stackId); var unitRecords = _gameDataRepository.GetUnitsByStackId(stackId); Units = new Units(); foreach (var unitRecord in unitRecords) { Units.Add(new Unit(unitRecord.Id)); } _gameDataRepository.StackUpdated += StackUpdated; }
public MainGame(PointI desiredResolution) { _graphicsDeviceManager = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; var gameConfigRepository = new GameConfigRepository(); CallContext <GameConfigRepository> .SetData("GameConfigRepository", gameConfigRepository); var gameConfigCache = new GameConfigCache(); CallContext <GameConfigCache> .SetData("GameConfigCache", gameConfigCache); var gameDataRepository = new GameDataRepository(); CallContext <GameDataRepository> .SetData("GameDataRepository", gameDataRepository); var presentationContext = new GlobalContextPresentation { DesiredResolution = desiredResolution }; CallContext <GlobalContextPresentation> .SetData("GlobalContextPresentation", presentationContext); }
#pragma warning restore 67 public void InitGameData() { var gameDataManager = new GameDataManager(); var languageRepository = new GameDataRepository <Language>(gameDataManager.Language); LanguageService = new LanguageService(languageRepository, _ffxivACTPluginWrapper, ACTConfig); var worldRepository = new GameDataRepository <World>(gameDataManager.World); WorldService = new WorldService(worldRepository); var classJobRepository = new GameDataRepository <ClassJob>(gameDataManager.ClassJob); ClassJobService = new ClassJobService(classJobRepository); LocationService = new LocationService(gameDataManager, _ffxivACTPluginWrapper); var contentRepository = new GameDataRepository <ContentFinderCondition>(gameDataManager.ContentFinderCondition); ContentService = new ContentService(_ffxivACTPluginWrapper.GetZoneList(), contentRepository); var itemRepository = new GameDataRepository <Item>(gameDataManager.Item); var itemActionRepository = new GameDataRepository <ItemAction>(gameDataManager.ItemAction); ItemService = new ItemService(itemRepository, itemActionRepository); PlayerService = new PlayerService(_actWrapper, _ffxivACTPluginWrapper, WorldService, ClassJobService); }
public void Add <TEntity>(TCategory category, GameDataRepository <TEntity> repository) where TEntity : TBaseEntity { ////// _entityDict.Add(category, repository.Entities.ConvertAll(entity => entity as TBaseEntity)); }
public void TestInitialize() { _gameDataMockRepository = new GameDataRepository <GameDataMock>(MockDataUtil.GetGameData()); }