public PriorityQueueEnumerator(LPriorityQueue pqOwner) { owner = pqOwner; version = pqOwner.version; head = pqOwner.header; Reset(); }
public PriorityQueueEnumerator(LPriorityQueue owner) { this.owner = owner; this.version = owner.version; head = owner.header; Reset(); }
/// <summary> /// Returns a synchronized wrapper of the specified PriorityQueue. /// </summary> /// <param name="queue"> /// The PriorityQueue to synchronize. /// </param> /// <returns> /// A synchronized PriorityQueue. /// </returns> /// <exception cref="ArgumentNullException"> /// If queue is null. /// </exception> public static LPriorityQueue Synchronized(LPriorityQueue queue) { #region Require if (queue == null) { throw new ArgumentNullException("queue"); } #endregion return(new SynchronizedPriorityQueue(queue)); }
/// <summary> /// Returns a synchronized wrapper of the specified PriorityQueue. /// </summary> /// <param name="queue"> /// The PriorityQueue to synchronize. /// </param> /// <returns> /// A synchronized PriorityQueue. /// </returns> /// <exception cref="ArgumentNullException"> /// If queue is null. /// </exception> public static LPriorityQueue Synchronized(LPriorityQueue queue) { #region Require if (queue == null) { MainConsole.Instance.Warn("[Priority Queue]: Queue is null"); return(null); } #endregion return(new SynchronizedPriorityQueue(queue)); }
public SynchronizedPriorityQueue(LPriorityQueue queue) { #region Require if (queue == null) { throw new ArgumentNullException("queue"); } #endregion this.queue = queue; root = queue.SyncRoot; }
public SynchronizedPriorityQueue(LPriorityQueue queue) { #region Require if (queue == null) { MainConsole.Instance.Error("[Priority Queue]: Queue is null"); return; } #endregion this.queue = queue; root = queue.SyncRoot; }