Ejemplo n.º 1
0
 /// <summary>
 /// </summary>
 public ExtendedPreprocessorTask(BSharpBuilderPhase phase)
 {
     Phase = phase;
     if (phase == BSharpBuilderPhase.PreProcess)
     {
         Index = TaskConstants.LoadAllSourcesTaskIndex + 10;
     }
     else
     {
         Index = TaskConstants.CompileBSharpTaskIndex + 10;
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// </summary>
 public ProcessorScript(IBSharpProject project, XElement e, BSharpBuilderPhase phase) : base(project, e)
 {
     _phase = phase;
 }
Ejemplo n.º 4
0
		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);
		}
Ejemplo n.º 5
0
 /// <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;
 }
Ejemplo n.º 6
0
		/// <summary>
		/// </summary>
		public ProcessorScript(IBSharpProject project, XElement e, BSharpBuilderPhase phase) : base(project, e){
			_phase = phase;
		}