Ejemplo n.º 1
0
        /// <summary>
        /// Attempts to pop the next available value from the front of the buffer.
        /// </summary>
        static public bool TryPopFront <T>(this IRingBuffer <T> ioBuffer, out T outValue)
        {
            if (ioBuffer.Count <= 0)
            {
                outValue = default(T);
                return(false);
            }

            outValue = ioBuffer.PopFront();
            return(true);
        }