Lines Matching refs:buffer
43 /// Parsing from the buffer is a loop of reading from current buffer / refreshing the buffer once done.
91 public bool RefillBuffer(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, bool mustSucceed)
95 return RefillFromCodedInputStream(ref buffer, ref state, mustSucceed);
99 return RefillFromReadOnlySequence(ref buffer, ref state, mustSucceed);
161 public static bool IsAtEnd(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state)
163 return state.bufferPos == state.bufferSize && !state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, false);
166 private bool RefillFromReadOnlySequence(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, bool mustSucceed)
189 buffer = readOnlySequenceEnumerator.Current.Span;
190 state.bufferSize = buffer.Length;
191 if (buffer.Length != 0)
221 private bool RefillFromCodedInputStream(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, bool mustSucceed)
243 state.bufferSize = (input == null) ? 0 : input.Read(codedInputStream.InternalBuffer, 0, buffer.Length);
278 // Limit is in current buffer.
292 throw new InvalidOperationException("RefillBuffer() called when buffer wasn't empty.");