Ejemplo n.º 1
0
 protected virtual void DoPut(StorePut put)
 {
     if (Items.Count < Capacity)
     {
         Items.Add(put.Value);
         put.Succeed();
     }
 }
Ejemplo n.º 2
0
 protected virtual void DoPut(StorePut put)
 {
     if (Items.Count < Capacity)
     {
         var pi = (PriorityItem)put.Value;
         Items.Enqueue(pi.Item, pi.Priority);
         put.Succeed();
     }
 }
Ejemplo n.º 3
0
 protected virtual void DoPut(StorePut put)
 {
     if (Items.Count < Capacity)
     {
         PutWaitingTime?.Add(Environment.ToDouble(Environment.Now - put.Time));
         Items.Add(new StoreItem()
         {
             AdmissionDate = Environment.Now, Item = put.Value
         });
         put.Succeed();
     }
 }
Ejemplo n.º 4
0
 protected virtual void DoPut(StorePut put)
 {
     if (Items.Count < Capacity)
     {
         var pi = (PriorityItem)put.Value;
         PutWaitingTime?.Add(Environment.ToDouble(Environment.Now - put.Time));
         Items.Enqueue(new StoreItem()
         {
             AdmissionDate = Environment.Now, Item = pi.Item
         }, pi.Priority);
         put.Succeed();
     }
 }
Ejemplo n.º 5
0
 protected virtual void DoPut(StorePut put)
 {
     if (Items.Count < Capacity) {
     Items.Add(put.Value);
     put.Succeed();
       }
 }