예제 #1
0
        /// <summary>
        /// Attempts to peek the next available value from the front of the buffer.
        /// </summary>
        static public bool TryPeekFront <T>(this IRingBuffer <T> inBuffer, out T outValue)
        {
            if (inBuffer.Count <= 0)
            {
                outValue = default(T);
                return(false);
            }

            outValue = inBuffer.PeekFront();
            return(true);
        }