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