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

            onExit.AddLog(new TransactLog(_time, EventTypeEnum.LeaveQueue));
            return(onExit);
        }
Beispiel #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())
     };
 }
Beispiel #3
0
 public Transact Leave()
 {
     _currentTransact.AddLog(new TransactLog(_time, EventTypeEnum.LeaveServer));
     IsFree = true;
     return(_currentTransact);
 }
Beispiel #4
0
 public void Enter(Transact transact)
 {
     transact.AddLog(new TransactLog(_time, EventTypeEnum.EnterQueue));
     _queue.Push(transact);
 }
Beispiel #5
0
 public void DrainTransact(Transact transact)
 {
     transact.AddLog(new TransactLog(_time, EventTypeEnum.Death));
     DrainedTransacts.Add(transact);
 }