Ejemplo n.º 1
0
        public Transact Leave()
        {
            Transact onExit = _queue.Pop();

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