private static void UpdateKey(string oldName, string newName, string config)
        {
            ServiceProvider services = LoadServices.AddServices(Config.GetConfigFromFile(config));

            Response response = services.GetRequiredService <ISource>().UpdateKey(oldName, newName);

            Console.WriteLine(response.Message);
        }
Beispiel #2
0
        private static void AddTranslation(string key, string scope, string locale, string text, string variant, string config)
        {
            ServiceProvider services = LoadServices.AddServices(Config.GetConfigFromFile(config));

            Response response = services.GetRequiredService <ISource>().AddTranslation(key, scope, locale, text, variant);

            Console.WriteLine(response.Message);
        }
Beispiel #3
0
        private static void AddLocale(string name, bool required, string config)
        {
            ServiceProvider services = LoadServices.AddServices(Config.GetConfigFromFile(config));

            Response response = services.GetRequiredService <ISource>().AddLocale(name, required);

            Console.WriteLine(response.Message);
        }
        private static void Initialize(string config)
        {
            ServiceProvider services = LoadServices.AddServices(Config.GetConfigFromFile(config));

            ISource source = services.GetRequiredService <ISource>();

            Response response = source.Initialize();

            Console.WriteLine(response.Message);
        }
Beispiel #5
0
        private static void Generate(string config)
        {
            ServiceProvider services = LoadServices.AddServices(Config.GetConfigFromFile(config));

            IEnumerable <IGenerator> generators = services.GetRequiredService <IEnumerable <IGenerator> >();

            foreach (IGenerator generator in generators)
            {
                generator.Generate();
            }
        }