示例#1
0
 public PokemonArenaService(PokemonRankSearchService rankSearchService,
                            PokedexProfilerService profilerService,
                            IDataAccess data)
 {
     _rankSearchService = rankSearchService;
     _profilerService   = profilerService;
     _data = data;
 }
示例#2
0
 public PokemonRankFactoryService(PokedexProfilerService profilerService)
 {
     _profilerService = profilerService;
     _dexerFunc       = (name) =>
     {
         int dexNum = _profilerService.GetPokedexNumber(name);
         if (dexNum == -1)
         {
             throw new OperationFailedException($"El nombre del pokémon '{name}' no existe. 😞",
                                                OperationErrorStatus.MalformedInput);
         }
         return(new PokemonRankItem()
         {
             DexNumber = dexNum,
             PkmnName = name
         });
     };
 }
示例#3
0
 public PokemonRankSearchController(PokemonRankSearchService rankSearchService,
                                    PokedexProfilerService profilerService)
 {
     _rankSearchService = rankSearchService;
     _profilerService   = profilerService;
 }
 public PokemonController(PokemonService pokemonService, PokedexProfilerService profilerService)
 {
     _pokemonService  = pokemonService;
     _profilerService = profilerService;
 }
示例#5
0
 public PokemonRankSearchService(PokemonRankFactoryService factoryService,
                                 PokedexProfilerService profilerService)
 {
     _factoryService  = factoryService;
     _profilerService = profilerService;
 }