Exemple #1
0
        public void GenerateList(IModifier modifier = default(IModifier))
        {
            var countriesEN = _reducer.GenerateList("en");
            var countriesGA = _reducer.GenerateList("ga");

            if (modifier != default(IModifier))
            {
                countriesEN = modifier.ModifyList(countriesEN, "en");
                countriesGA = modifier.ModifyList(countriesGA, "ga");
            }

            countriesEN = countriesEN.OrderBy(c => c.Code).ToList();
            countriesGA = countriesGA.OrderBy(c => c.Code).ToList();

            _cSharpGeneratorService.WriteCSharp(countriesEN, "en");
            _cSharpGeneratorService.WriteCSharp(countriesGA, "ga");
            _csvGeneratorService.WriteCsv(countriesEN, "en");
            _csvGeneratorService.WriteCsv(countriesGA, "ga");
            _jsonGeneratorService.WriteJson(countriesEN, "en");
            _jsonGeneratorService.WriteJson(countriesGA, "ga");
            _tsvGeneratorService.WriteTsv(countriesEN, "en");
            _tsvGeneratorService.WriteTsv(countriesGA, "ga");
            _gaoisGeneratorService.WriteCountries(countriesEN, countriesGA);
        }
Exemple #2
0
        public void GenerateList(string locale, IModifier modifier = default(IModifier))
        {
            var countries = _reducer.GenerateList(locale);

            if (modifier != default(IModifier))
            {
                var modifiedCountries = modifier.ModifyList(countries, locale);
                countries = modifiedCountries;
            }

            countries = countries.OrderBy(c => c.Code).ToList();

            _cSharpGeneratorService.WriteCSharp(countries, locale);
            _csvGeneratorService.WriteCsv(countries, locale);
            _jsonGeneratorService.WriteJson(countries, locale);
            _tsvGeneratorService.WriteTsv(countries, locale);
        }