예제 #1
0
        public Transact Leave()
        {
            Transact onExit = _queue.Pop();

            onExit.AddLog(new TransactLog(_time, EventTypeEnum.LeaveQueue));
            return(onExit);
        }
예제 #2
0
 public void Enter(Transact transact)
 {
     transact.AddLog(new TransactLog(_time, EventTypeEnum.EnterServer));
     IsFree           = false;
     _currentTransact = transact;
     NextReleaseTime  = new ModelTime()
     {
         Time = _time.Time + (_currentTransact.Type == TransactTypeEnum.Atype ? _aTypeGenerator.Next() : _bTypeGenerator.Next())
     };
 }
예제 #3
0
 public Transact Leave()
 {
     _currentTransact.AddLog(new TransactLog(_time, EventTypeEnum.LeaveServer));
     IsFree = true;
     return(_currentTransact);
 }
예제 #4
0
 public void Enter(Transact transact)
 {
     transact.AddLog(new TransactLog(_time, EventTypeEnum.EnterQueue));
     _queue.Push(transact);
 }
예제 #5
0
 public void DrainTransact(Transact transact)
 {
     transact.AddLog(new TransactLog(_time, EventTypeEnum.Death));
     DrainedTransacts.Add(transact);
 }