System.Net.WebSockets.WebSocketBuffer.IsInternalBuffer C# (CSharp) 메소드

IsInternalBuffer() 개인적인 메소드

private IsInternalBuffer ( byte buffer, int offset, int count ) : bool
buffer byte
offset int
count int
리턴 bool
        internal bool IsInternalBuffer(byte[] buffer, int offset, int count)
        {
            Debug.Assert(buffer != null, "'buffer' MUST NOT be NULL.");
            Debug.Assert(_nativeBuffer.Array != null, "'m_NativeBuffer.Array' MUST NOT be NULL.");
            Debug.Assert(offset >= 0, "'offset' MUST NOT be negative.");
            Debug.Assert(count >= 0, "'count' MUST NOT be negative.");
            Debug.Assert(offset + count <= buffer.Length, "'offset + count' MUST NOT exceed 'buffer.Length'.");

            return object.ReferenceEquals(buffer, _nativeBuffer.Array) &&
                offset >= _nativeBuffer.Offset &&
                offset + count <= _nativeBuffer.Offset + _nativeBuffer.Count;
        }