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