示例#1
0
 public static CodeBase Execute(CodeBaseOptions options, BackgroundWorker backgroundWorker)
 {
     CodeBase codeBase = new CodeBase(options.CreateCompilerDefines(), new FileLoader());
     CodeBaseWorker worker = new CodeBaseWorker(codeBase, options, backgroundWorker);
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     try {
         worker.ExecuteInternal();
     } catch(CancelException) {
     }
     stopwatch.Stop();
     codeBase.ParseDuration = stopwatch.Elapsed;
     return codeBase;
 }
示例#2
0
        public static CodeBase Execute(CodeBaseOptions options, BackgroundWorker backgroundWorker)
        {
            CodeBase       codeBase  = new CodeBase(options.CreateCompilerDefines(), new FileLoader(false));
            CodeBaseWorker worker    = new CodeBaseWorker(codeBase, options, backgroundWorker);
            Stopwatch      stopwatch = new Stopwatch();

            stopwatch.Start();
            try {
                worker.ExecuteInternal();
            } catch (CancelException) {
            }
            stopwatch.Stop();
            codeBase.ParseDuration = stopwatch.Elapsed;
            return(codeBase);
        }