コード例 #1
0
        static void Main(string[] args)
        {
            var options      = new Options();
            var parseSuccess = CommandLine.Parser.Default.ParseArguments(args, options);

            if (parseSuccess)
            {
                IDeepCopier        copier     = new DeepCopier();
                IResxReader        resxReader = new ResxReader();
                IJsonHelper        jsonHelper = new NewtonsoftJsonHelper();
                IResxToJsConverter converter  = new ResxToJsConverter(copier, resxReader, jsonHelper);
                converter.Convert(options);
            }
            else
            {
                Console.WriteLine("An error occurred while parsing the resx files.");
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ctaleck/ResxToJS
        static void Main(string[] args)
        {
            log4net.Config.BasicConfigurator.Configure();

            var options = new Options();
            var parseSuccess = CommandLine.Parser.Default.ParseArguments(args, options);
            if (parseSuccess)
            {
                var appState = new ApplicationState();
                var copier = new DeepCopier();
                var resxReader = new ResxReader(appState, null);
                var jsonHelper = new JsonHelper();
                var converter = new ResxToJsConverter(copier, resxReader, jsonHelper, appState, null);
                converter.Convert(options);
                DisplayErrorMessages(appState);
            }
            else
            {
                Console.WriteLine("An error occurred while parsing the options.");
            }

            ////Console.ReadLine();
        }