Exemplo n.º 1
0
 public override void AddProcess(ThreadProcess process)
 {
     base.AddProcess(process, this.IsSame);
     if (!this.IsSame)
     {
         this.Controller.RunToProcess(this.OrderAction, process);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 /// <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
     });
 }
Exemplo n.º 4
0
 public override void OrderAction(ThreadProcess process)
 {
     process.IsWait = false;
 }
Exemplo n.º 5
0
 public virtual void OrderAction(ThreadProcess process)
 {
     throw new Exception("This method must be implemented.");
 }
Exemplo n.º 6
0
 public virtual void AddProcess(ThreadProcess process)
 {
     this.AddProcess(process, true);
 }