Example #1
0
 public Process()
     : base()
 {
     _allProcesses.AddLast(this);
     childs = new LinkedList<Process>();
     parent = currentExecutingProcess;
     if (parent != null)
     {
         parent.childs.AddLast(this);
     }
 }
Example #2
0
        public void _ExecuteProcess()
        {
            if (State == State.Ended) return;

            currentExecutingProcess = this;

            this._ExecuteProcessBefore();
            //Console.WriteLine("<Execute " + this + ">");
            this.SwitchTo();
            //Console.WriteLine("</Execute " + this + ">");
            this._ExecuteProcessAfter();
        }