src/Orleans.Serialization/Buffers/Reader.cs
/// <summary>
/// Reads an array of bytes from the input.
/// </summary>
/// <param name="count">The length of the array to read.</param>
/// <returns>The array wihch was read.</returns>
Reads an array of bytes from the input.
Reads an array of bytes from the input .
public byte[] ReadBytes(uint count)
        {
            if (count == 0)
            {
                return Array.Empty<byte>();
            }
            if (count > 10240 && count > Length)
            {
                ThrowInvalidSizeException(count);
            }
            var bytes = new byte[count];
            if (IsReadOnlySequenceInput || IsSpanInput)
            {
                var destination = new Span<byte>(bytes);
                ReadBytes(in destination);
            }
            else if (_input is ReaderInput readerInput)
            {
                readerInput.ReadBytes(bytes, 0, (int)count);
            }
            return bytes;
        }
public byte [ ] ReadBytes ( uint count ) { if ( count == 0 ) { return Array . Empty < byte > ( ) ; } if ( count > 10240 && count > Length ) { ThrowInvalidSizeException ( count ) ; } var bytes = new byte [ count ] ; if ( IsReadOnlySequenceInput || IsSpanInput ) { var destination = new Span < byte > ( bytes ) ; ReadBytes ( in destination ) ; } else if ( _input is ReaderInput readerInput ) { readerInput . ReadBytes ( bytes , 0 , ( int ) count ) ; } return bytes ; }
Reads an array of bytes from the input.
Reads an array of bytes from the input .
The array wihch was read.
The array wihch was read .
count
uint
The length of the array to read.
The length of the array to read .