src/Orleans.Serialization/Buffers/Reader.cs
/// <summary>
/// Reads a byte from the input.
/// </summary>
/// <returns>The byte which was read.</returns>
Reads a byte from the input.
Reads a byte from the input .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public byte ReadByte()
        {
            if (IsReadOnlySequenceInput || IsSpanInput)
            {
                var pos = _bufferPos;
                var span = _currentSpan;
                if ((uint)pos >= (uint)span.Length)
                {
                    return ReadByteSlow(ref this);
                }
                var result = span[pos];
                _bufferPos = pos + 1;
                return result;
            }
            else if (_input is ReaderInput readerInput)
            {
                return readerInput.ReadByte();
            }
            else
            {
                return ThrowNotSupportedInput<byte>();
            }
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public byte ReadByte ( ) { if ( IsReadOnlySequenceInput || IsSpanInput ) { var pos = _bufferPos ; var span = _currentSpan ; if ( ( uint ) pos >= ( uint ) span . Length ) { return ReadByteSlow ( ref this ) ; } var result = span [ pos ] ; _bufferPos = pos + 1 ; return result ; } else if ( _input is ReaderInput readerInput ) { return readerInput . ReadByte ( ) ; } else { return ThrowNotSupportedInput < byte > ( ) ; } }
Reads a byte from the input.
Reads a byte from the input .
The byte which was read.
The byte which was read .