Exemplo n.º 1
0
        public RtdxStarterCollectionViewModel(IStarterCollection starterCollection, ICommonStrings commonStrings)
        {
            if (starterCollection == null)
            {
                throw new ArgumentNullException(nameof(starterCollection));
            }

            Starters         = starterCollection.Starters.Select(s => new RtdxStarterViewModel(s, commonStrings)).ToList();
            _selectedStarter = Starters.First();
        }
 public StarterQueries(ICommonStrings commonStrings,
                       IMainExecutable mainExecutable,
                       NDConverterSharedData.DataStore natureDiagnosis,
                       IFixedPokemon fixedPokemon)
 {
     this.commonStrings   = commonStrings ?? throw new ArgumentNullException(nameof(commonStrings));
     this.mainExecutable  = mainExecutable ?? throw new ArgumentNullException(nameof(mainExecutable));
     this.natureDiagnosis = natureDiagnosis ?? throw new ArgumentNullException(nameof(natureDiagnosis));
     this.fixedPokemon    = fixedPokemon ?? throw new ArgumentNullException(nameof(fixedPokemon));
 }
        public RtdxStarterViewModel(IStarterModel model, ICommonStrings commonStrings)
        {
            this.model = model ?? throw new ArgumentNullException(nameof(model));

            if (commonStrings == null)
            {
                throw new ArgumentNullException(nameof(commonStrings));
            }
            this.PokemonOptions        = commonStrings.Pokemon.Select(kv => new ListItem <CreatureIndex>(kv.Value, kv.Key)).OrderBy(li => li.DisplayName).ThenBy(li => li.Value).ToList();
            this.MoveOptions           = commonStrings.Moves.Select(kv => new ListItem <WazaIndex>(kv.Value, kv.Key)).OrderBy(li => li.DisplayName).ThenBy(li => li.Value).ToList();
            this.PokemonOptionsByValue = PokemonOptions.ToDictionary(li => li.Value, li => li);
            this.MoveOptionsByValue    = MoveOptions.ToDictionary(li => li.Value, li => li);
        }
Exemplo n.º 4
0
 public StarterModel(ICommonStrings commonStrings)
 {
     this.commonStrings = commonStrings ?? throw new ArgumentNullException(nameof(commonStrings));
 }
Exemplo n.º 5
0
 public DungeonModel(ICommonStrings commonStrings, DungeonDataInfo.Entry data)
 {
     this.commonStrings = commonStrings ?? throw new ArgumentNullException(nameof(commonStrings));
     this.Data          = data ?? throw new ArgumentNullException(nameof(data));
 }