예제 #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);
        }