Example #1
0
 protected virtual void DoRequest(Request request)
 {
     if (Users.Count < Capacity)
     {
         Users.Add(request);
         request.Succeed();
     }
 }
Example #2
0
 protected virtual void DoRequest(Request request)
 {
     if (request.Quantity <= Remaining)
     {
         InUse += request.Quantity;
         Users.Add(request);
         request.Succeed();
     }
 }
Example #3
0
 protected virtual void DoRequest(Request request)
 {
     if (Users.Count < Capacity)
     {
         WaitingTime?.Add(Environment.ToDouble(Environment.Now - request.Time));
         Users.Add(request);
         request.Succeed();
     }
 }
Example #4
0
 protected virtual void DoRequest(Request request) {
   if (Users.Count < Capacity) {
     Users.Add(request);
     request.Succeed();
   }
 }