/// <summary> /// Cache the Several <see cref="Envelope"/>s into the <see cref="EnvelopeQueue"/> /// </summary> /// <param name="envelopes">Collection of cached objects</param> /// <param name="InFront">Mark if enter the priority queue</param> internal void Enqueue(IEnumerable <Envelope> envelopes, bool InFront = false) { var container = InFront ? PriorityContainer : EnvelopeContainer; foreach (Envelope envelope in envelopes) { container.Enqueue(envelope); } EnterNewEnvelopCallback.Invoke(); }
/// <summary> /// Cache the <see cref="Envelope"/> into the <see cref="EnvelopeQueue"/> /// </summary> /// <param name="envelope">Cache object</param> /// <param name="InFront">Mark if enter the priority queue</param> internal void Enqueue(Envelope envelope, bool InFront = false) { (InFront ? PriorityContainer : EnvelopeContainer).Enqueue(envelope); EnterNewEnvelopCallback.Invoke(); }