コード例 #1
0
ファイル: RingBufferUtils.cs プロジェクト: BeauPrime/BeauUtil
        /// <summary>
        /// Attempts to peek the next available value from the back of the buffer.
        /// </summary>
        static public bool TryPeekBack <T>(this IRingBuffer <T> inBuffer, out T outValue)
        {
            if (inBuffer.Count <= 0)
            {
                outValue = default(T);
                return(false);
            }

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