/// <summary> /// Add a ticket to the end of the list. /// </summary> /// <param name="t">Ticket</param> public void AddTicket(Ticket t) { Node node = new Node(ticket: t, prev: end); if (start == null) start = node; if (end != null) end.Next = node; end = node; }
/// <summary> /// Add a ticket to the queue /// </summary> /// <param name="t">Ticket</param> public void AddTicket(Ticket t) { lists[(int)t.Priority].AddTicket(t); }
/// <summary> /// Construct a node in the list /// </summary> /// <param name="ticket">Ticket object</param> /// <param name="prev"></param> /// <param name="next"></param> public Node(Ticket ticket, Node prev = null, Node next = null) { this.Ticket = ticket; this.Prev = prev; this.Next = next; }