示例#1
0
        public CompileResponse Compile(CompileRequest args)
        {
            var skc = new CompilerTool {
                Args = args.Args, CommandLineArguments = new string[] { args.CommandLineArgs }
            };
            var x  = skc.Run();
            var xx = new CompileResponse {
                Output = skc.Log.Console.Items.ToList(), ExitCode = x
            };

            return(xx);
        }
示例#2
0
        static int Main(string[] args)
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            CollectionExtensions.Parallel          = ConfigurationManager.AppSettings["Parallel"] == "true";
            CollectionExtensions.ParallelPreAction = () => Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            //Console.AutoFlush = true;
            Console.WriteLine("Parallel=" + CollectionExtensions.Parallel);
            var skc = new CompilerTool {
                CommandLineArguments = args
            };

#if DEBUG
            skc.Debug = true;
#endif
            var res = skc.Run();
            stopwatch.Stop();
            //Console.FormatLine("Total: {0}ms", stopwatch.ElapsedMilliseconds);
            //Console.Flush();
            return(res);
        }