Exemplo n.º 1
0
        public DefaultCharacterService(IRepository <ICharacter> repository,
                                       IMovementService movementService, ICharacterAttributeRowService attributeRowService,
                                       IMoveService moveService, IUniqueDataService uniqueDataService, IGameParameterParserService gameParameterParserService)
            : base(repository, gameParameterParserService)
        {
            Guard.VerifyObjectNotNull(attributeRowService, nameof(attributeRowService));
            Guard.VerifyObjectNotNull(moveService, nameof(moveService));
            Guard.VerifyObjectNotNull(movementService, nameof(movementService));
            Guard.VerifyObjectNotNull(uniqueDataService, nameof(uniqueDataService));

            _attributeRowService = attributeRowService;
            _moveService         = moveService;
            _movementService     = movementService;
            _uniqueDataService   = uniqueDataService;
        }
Exemplo n.º 2
0
        public void SeedCharacterData(WebCharacter character,
                                      ICharacterService characterService,
                                      IMovementService movementService,
                                      IMoveService moveService,
                                      ICharacterAttributeRowService characterAttributeRowService,
                                      IUniqueDataService uniqueDataService)
        {
            Guard.VerifyObjectNotNull(character, nameof(character));
            Guard.VerifyObjectNotNull(characterService, nameof(characterService));
            Guard.VerifyObjectNotNull(movementService, nameof(movementService));
            Guard.VerifyObjectNotNull(moveService, nameof(moveService));
            Guard.VerifyObjectNotNull(characterAttributeRowService, nameof(characterAttributeRowService));
            Guard.VerifyObjectNotNull(uniqueDataService, nameof(uniqueDataService));

            _characterDataScraper.PopulateCharacterFromWeb(character);

            var entityCharacter = Mapper.Map <Character>(character);

            characterService.Add(entityCharacter);
            movementService.AddMany(character.Movements);
            moveService.AddMany(character.Moves);
            characterAttributeRowService.AddMany(character.AttributeRows);
            uniqueDataService.AddMany(character.UniqueProperties);
        }
Exemplo n.º 3
0
 public UniqueDataController(IUniqueDataService uniqueDataService, IEnrichmentProvider enrichmentProvider)
 {
     Guard.VerifyObjectNotNull(uniqueDataService, nameof(uniqueDataService));
     _uniqueDataService  = uniqueDataService;
     _enrichmentProvider = enrichmentProvider;
 }
Exemplo n.º 4
0
 public UniqueDataController(IUniqueDataService uniqueDataService)
 {
     Guard.VerifyObjectNotNull(uniqueDataService, nameof(uniqueDataService));
     _uniqueDataService = uniqueDataService;
 }