System.IO.Pipes.PipeStream.DebugAssertReadWriteArgs C# (CSharp) Method

DebugAssertReadWriteArgs() private method

private DebugAssertReadWriteArgs ( byte buffer, int offset, int count, SafePipeHandle handle ) : void
buffer byte
offset int
count int
handle Microsoft.Win32.SafeHandles.SafePipeHandle
return void
        private static void DebugAssertReadWriteArgs(byte[] buffer, int offset, int count, SafePipeHandle handle)
        {
            Debug.Assert(buffer != null, "buffer is null");
            Debug.Assert(offset >= 0, "offset is negative");
            Debug.Assert(count >= 0, "count is negative");
            Debug.Assert(offset <= buffer.Length - count, "offset + count is too big");
            Debug.Assert(handle != null, "handle is null");
            Debug.Assert(!handle.IsClosed, "handle is closed");
        }