示例#1
0
 public override void AddProcess(ThreadProcess process)
 {
     base.AddProcess(process, this.IsSame);
     if (!this.IsSame)
     {
         this.Controller.RunToProcess(this.OrderAction, process);
     }
 }
示例#2
0
 protected void AddProcess(ThreadProcess process, bool isRunToProcess)
 {
     if (!this.SpecifiedProcesses.Contains(process))
     {
         throw new Exception("This process is not specified.");
     }
     this.ProcessCount++;
     if (this.ProcessCount == this.SpecifiedProcesses.Length && isRunToProcess)
     {
         this.Controller.RunToProcess(this.OrderAction, this.SpecifiedProcesses);
     }
 }
 /// <summary>
 /// 与えられたIDと一致する命令にプロセスを追加します。
 /// </summary>
 /// <param name="id">命令のID</param>
 /// <param name="process">プロセス</param>
 public void AddProcessToOrder(string id, ThreadProcess process)
 {
     if (this.Orders.Select(x => x.Id).Contains(id))
     {
         this.Orders.Where(x => x.Id == id).ToList()[0].AddProcess(process);
         return;
     }
     if (this.WaitingProcesses.ContainsKey(id))
     {
         this.WaitingProcesses[id].Add(process);
         return;
     }
     this.WaitingProcesses.Add(id, new List <ThreadProcess>()
     {
         process
     });
 }
示例#4
0
 public override void OrderAction(ThreadProcess process)
 {
     process.IsWait = false;
 }
示例#5
0
 public virtual void OrderAction(ThreadProcess process)
 {
     throw new Exception("This method must be implemented.");
 }
示例#6
0
 public virtual void AddProcess(ThreadProcess process)
 {
     this.AddProcess(process, true);
 }