src/Orleans.Serialization/Buffers/Reader.cs
/// <summary>
/// Resumes the reader from the specified position after forked readers are no longer in use.
/// </summary>
/// <param name="position">
/// The position to resume reading from.
/// </param>
Resumes the reader from the specified position after forked readers are no longer in use.
Resumes the reader from the specified position after forked readers are no longer in use .
public void ResumeFrom(long position)
        {
            if (IsReadOnlySequenceInput)
            {
            }
            else if (IsSpanInput)
            {
            }
            else if (_input is ReaderInput input)
            {
                input.Seek(Position);
            }
            else
            {
                throw new NotSupportedException($"Type {typeof(TInput)} is not supported");
            }
            if (position != Position)
            {
                ThrowInvalidPosition(position, Position);
            }
            [MethodImpl(MethodImplOptions.NoInlining)]
            static void ThrowInvalidPosition(long expectedPosition, long actualPosition)
            {
                throw new InvalidOperationException($"Expected to arrive at position {expectedPosition} after {nameof(ResumeFrom)}, but resulting position is {actualPosition}");
            }
        }
public void ResumeFrom ( long position ) { if ( IsReadOnlySequenceInput ) { } else if ( IsSpanInput ) { } else if ( _input is ReaderInput input ) { input . Seek ( Position ) ; } else { throw new NotSupportedException ( $" Type  { typeof ( TInput ) }  is not supported " ) ; } if ( position != Position ) { ThrowInvalidPosition ( position , Position ) ; } [ MethodImpl ( MethodImplOptions . NoInlining ) ] static void ThrowInvalidPosition ( long expectedPosition , long actualPosition ) { throw new InvalidOperationException ( $" Expected to arrive at position  { expectedPosition }  after  { nameof ( ResumeFrom ) } , but resulting position is  { actualPosition } " ) ; } }
Resumes the reader from the specified position after forked readers are no longer in use.
Resumes the reader from the specified position after forked readers are no longer in use .
// Nothing is required. // Nothing is required. // Seek the input stream.
position
long
The position to resume reading from.
The position to resume reading from .