/// <summary> /// </summary> public ExtendedPreprocessorTask(BSharpBuilderPhase phase) { Phase = phase; if (phase == BSharpBuilderPhase.PreProcess) { Index = TaskConstants.LoadAllSourcesTaskIndex + 10; } else { Index = TaskConstants.CompileBSharpTaskIndex + 10; } }
private void ExecutePhase(IBSharpContext result, BSharpBuilderPhase phase) { Log.Trace("\tstart phase " + phase); IBSharpBuilderTask[] tasks = Tasks.Where(_ => _.Phase == phase).OrderBy(_ => _.Index).ToArray(); foreach (IBSharpBuilderTask t in tasks) { Log.Trace("\t\t" + t.GetType().Name + " started"); if (t.Async) { pending.Add(Task.Run(() => ExecuteTask(result, t))); } else { ExecuteTask(result, t); } } Task.WaitAll(pending.ToArray()); Log.Trace("\tend phase " + phase); }
/// <summary> /// </summary> public ProcessorScript(IBSharpProject project, XElement e, BSharpBuilderPhase phase) : base(project, e) { _phase = phase; }
private void ExecutePhase(IBSharpContext result, BSharpBuilderPhase phase){ Log.Trace("\tstart phase " + phase); IBSharpBuilderTask[] tasks = Tasks.Where(_ => _.Phase == phase).OrderBy(_ => _.Index).ToArray(); foreach (IBSharpBuilderTask t in tasks){ Log.Trace("\t\t" + t.GetType().Name + " started"); if (t.Async){ pending.Add(Task.Run(() => ExecuteTask(result, t))); } else{ ExecuteTask(result, t); } } Task.WaitAll(pending.ToArray()); Log.Trace("\tend phase " + phase); }
/// <summary> /// /// </summary> /// <param name="phase"></param> /// <param name="index"></param> public GenerateJsonModuleTask(BSharpBuilderPhase phase = BSharpBuilderPhase.PostProcess, int index = TaskConstants.GenerateSrcPackageTaskIndex) { Phase = phase; Index = index; Async = true; }
/// <summary> /// </summary> public ProcessorScript(IBSharpProject project, XElement e, BSharpBuilderPhase phase) : base(project, e){ _phase = phase; }