/// <summary>
 /// QueueItem to serialize
 /// </summary>
 object QueueItemObject(QueueItem queueItem)
 {
     return new {
         MediumID    = queueItem.Container.Medium.Id,
         ContainerID = queueItem.Container.Id,
         Item        = queueItem.Item
     };
 }
Exemple #2
0
 /// <summary>
 /// Constructs a new queue with one QueueItem in it.
 /// </summary>
 /// <param name="item">The item to add to the queue</param>
 public Queue(QueueItem item)
     : this()
 {
     _itemsOriginal.Add(item);
     _items.Add(item);
 }
Exemple #3
0
 /// <summary>
 /// Appends the given item to the end of the queue
 /// </summary>
 /// <param name="item">The item to add</param>
 public void Push(QueueItem item)
 {
     _items.Add(item);
     OnItemsUpdated();
 }
Exemple #4
0
 /// <summary>
 /// Appends the given item to the end of the priority queue
 /// </summary>
 /// <param name="item">The item to add</param>
 public void PushToPriority(QueueItem item)
 {
     PushToPriority(new List<QueueItem>() { item });
 }
Exemple #5
0
 /// <summary>
 /// Prepends the given item to the start of the priority queue
 /// </summary>
 /// <param name="item">The item to add</param>
 public void Prioritize(QueueItem item)
 {
     Prioritize(new List<QueueItem>() { item });
 }