Esempio n. 1
0
        private static void ExecuteProgramUnchecked(string[] args)
        {
            Dictionary <string, string> argLookup = FlagParser.Parse(args);

            if (argLookup.ContainsKey(FlagParser.GEN_DEFAULT_PROJ))
            {
                DefaultProjectGenerator         generator = new DefaultProjectGenerator(argLookup[FlagParser.GEN_DEFAULT_PROJ].Trim());
                Dictionary <string, FileOutput> project   = generator.Validate().Export();

                string directory = System.IO.Path.Combine(
                    System.IO.Directory.GetCurrentDirectory(),
                    generator.ProjectID);
                new FileOutputExporter(directory).ExportFiles(project);

                Console.WriteLine("Empty project exported to directory '" + generator.ProjectID + "/'");
            }
            else
            {
                Program.Compile(argLookup);
            }
#if DEBUG
            if (argLookup != null)
            {
                if (argLookup.ContainsKey(FlagParser.SHOW_PERFORMANCE_MARKERS))
                {
                    string summary = PerformanceTimer.GetSummary();
                    Console.WriteLine(summary);
                }
            }
#endif
        }
        public override CrayonWorkerResult DoWorkImpl(CrayonWorkerResult[] args)
        {
            ExportCommand                   command   = (ExportCommand)args[0].Value;
            DefaultProjectGenerator         generator = new DefaultProjectGenerator(command.DefaultProjectId, command.DefaultProjectLocale);
            Dictionary <string, FileOutput> project   = generator.Validate().Export();

            string directory = FileUtil.JoinPath(
                FileUtil.GetCurrentDirectory(),
                generator.ProjectID);

            new FileOutputExporter(directory).ExportFiles(project);

            Console.WriteLine("Empty project exported to directory '" + generator.ProjectID + "/'");
            return(null);
        }
Esempio n. 3
0
        public void DoWorkImpl(ExportCommand command)
        {
            DefaultProjectGenerator         generator = new DefaultProjectGenerator(command.DefaultProjectId, command.DefaultProjectLocale);
            Dictionary <string, FileOutput> project   = generator.Validate().Export();

            string directory = FileUtil.JoinPath(
                Path.GetCurrentDirectory(),
                generator.ProjectID);

            new FileOutputExporter(directory).ExportFiles(project);

            ConsoleWriter.Print(
                ConsoleMessageType.DEFAULT_PROJ_EXPORT_INFO,
                "Empty project exported to directory '" + generator.ProjectID + "/'");
        }