32 instantiations of ReadOnlySequence
Microsoft.AspNetCore.Components (1)
PersistentState\PersistentValueProviderComponentSubscription.cs (1)
144var sequence = new ReadOnlySequence<byte>(data!);
Microsoft.AspNetCore.Components.Forms (1)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
153var sequence = new ReadOnlySequence<char>(this, startIndex, tail, tail.Memory.Length);
Microsoft.AspNetCore.Components.Server (3)
BlazorPack\SequenceOfT.cs (1)
109? new ReadOnlySequence<T>(sequence.first, sequence.first.Start, sequence.last, sequence.last.End)
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\ExtensionResult.cs (1)
19this.Data = new ReadOnlySequence<byte>(data);
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequenceReader.cs (1)
116this.sequence = new ReadOnlySequence<T>(this.memory);
Microsoft.AspNetCore.Components.Web (1)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
153var sequence = new ReadOnlySequence<char>(this, startIndex, tail, tail.Memory.Length);
Microsoft.AspNetCore.HttpLogging (1)
BufferingStream.cs (1)
64var ros = new ReadOnlySequence<byte>(_head, 0, _tail, _tailBytesBuffered);
Microsoft.AspNetCore.OutputCaching (8)
OutputCacheEntryFormatter.cs (4)
49await bufferStore.SetAsync(key, new(buffer.GetCommittedMemory()), CopyToLeasedMemory(tags, out var lease), duration, cancellationToken); 319result.SetBody(new ReadOnlySequence<byte>(ReadSegment(ref reader)), recycleBuffers: false); // we're reusing the live payload buffers 329result.SetBody(new ReadOnlySequence<byte>(first, 0, last, last.Length), recycleBuffers: false); // we're reusing the live payload buffers 369result.SetBody(new(reader.ReadBytesMemory(payloadLength)), recycleBuffers: false); // we're reusing the live payload buffers
RecyclableReadOnlySequenceSegment.cs (2)
91return new(segments[0]); 98return new(first, 0, last, last.Length);
RecyclableSequenceBuilder.cs (2)
44return new(memory); 48var payload = new ReadOnlySequence<byte>(_firstSegment, 0, _currentSegment!, _currentSegmentIndex);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\Http1ContentLengthMessageBody.cs (1)
221_readResult = new ReadResult(new ReadOnlySequence<byte>(), isCanceled: false, isCompleted: true);
Internal\Http2\Http2KeepAlive.cs (1)
24internal static readonly ReadOnlySequence<byte> PingPayload = new ReadOnlySequence<byte>(new byte[8]);
Microsoft.AspNetCore.SignalR.Common (1)
Protocol\RawResult.cs (1)
30RawSerializedData = new ReadOnlySequence<byte>(rawBytes.ToArray());
Microsoft.Extensions.Caching.Hybrid (3)
Internal\BufferChunk.cs (1)
92internal ReadOnlySequence<byte> AsSequence() => Length == 0 ? default : new ReadOnlySequence<byte>(OversizedArray!, Offset, Length);
Internal\DefaultHybridCache.StampedeStateT.cs (1)
449immutable.SetValue(serializer.Deserialize(new(value.OversizedArray!, value.Offset, value.Length)), value.Length);
Internal\RecyclableArrayBufferWriter.cs (1)
134public ReadOnlySequence<T> AsSequence() => new(_buffer, 0, _index);
Microsoft.Extensions.Caching.Hybrid.Tests (5)
DistributedCacheTests.cs (4)
286payload = new(arr); 291payload = new(arr, 5, arr.Length - 10); 295payload = new(mem); 312payload = new(first, 7, third, 4);
SerializerTests.cs (1)
316var result = new ReadOnlySequence<byte>(first, 0, second, chunk.Length - 1);
System.IO.Pipelines (2)
System\IO\Pipelines\Pipe.cs (1)
973var readOnlySequence = new ReadOnlySequence<byte>(head, _readHeadIndex, _readTail, _readTailIndex);
System\IO\Pipelines\StreamPipeReader.cs (1)
485return _readHead is null ? default : new ReadOnlySequence<byte>(_readHead, _readIndex, _readTail!, _readTail!.End);
System.Memory (3)
System\Buffers\ReadOnlySequence.cs (1)
26public static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(Array.Empty<T>());
System\Buffers\ReadOnlySequence.Helpers.cs (2)
473return new ReadOnlySequence<T>( 488return new ReadOnlySequence<T>(
System.Text.Json (1)
System\Text\Json\Serialization\StreamReadBufferState.cs (1)
55public readonly ReadOnlySequence<byte> Bytes => new(_buffer.AsMemory(_offset, _count));
417 references to ReadOnlySequence
Aspire.Dashboard (1)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
250Func<ReadOnlySequence<byte>, T> exporter)
Aspire.Hosting (1)
Dcp\DcpHost.cs (1)
387void LogLines(in ReadOnlySequence<byte> buffer, out SequencePosition position)
Microsoft.AspNetCore.Components (4)
IPersistentComponentStateSerializer.cs (1)
11object Restore(Type type, ReadOnlySequence<byte> data);
PersistentState\PersistentComponentStateSerializer.cs (2)
27public abstract T Restore(ReadOnlySequence<byte> data); 38object IPersistentComponentStateSerializer.Restore(Type type, ReadOnlySequence<byte> data)
PersistentState\PersistentValueProviderComponentSubscription.cs (1)
144var sequence = new ReadOnlySequence<byte>(data!);
Microsoft.AspNetCore.Components.Forms (1)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
153var sequence = new ReadOnlySequence<char>(this, startIndex, tail, tail.Memory.Length);
Microsoft.AspNetCore.Components.Server (43)
BlazorPack\BlazorPackHubProtocol.cs (1)
39public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, out HubMessage message)
BlazorPack\SequenceOfT.cs (9)
14/// Manages a sequence of elements, readily castable as a <see cref="ReadOnlySequence{T}"/>. 87/// Gets this sequence expressed as a <see cref="ReadOnlySequence{T}"/>. 90public ReadOnlySequence<T> AsReadOnlySequence => this; 103/// Expresses this sequence as a <see cref="ReadOnlySequence{T}"/>. 106public static implicit operator ReadOnlySequence<T>(Sequence<T> sequence) 110: ReadOnlySequence<T>.Empty; 119/// This is typically <see cref="ReadOnlySequence{T}.End"/> after reading all elements from that instance. 189/// This invalidates any <see cref="ReadOnlySequence{T}"/> previously produced by this instance. 196/// This invalidates any <see cref="ReadOnlySequence{T}"/> previously produced by this instance.
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (2)
28public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 30if (!BinaryMessageParser.TryParseMessage(ref input, out var payload))
src\aspnetcore\src\SignalR\common\Shared\BinaryMessageParser.cs (4)
13public static bool TryParseMessage(ref ReadOnlySequence<byte> buffer, out ReadOnlySequence<byte> payload) 36var lengthPrefixBuffer = buffer.Slice(0, Math.Min(MaxLengthPrefixSize, buffer.Length)); 75private static ReadOnlySpan<byte> GetSpan(in ReadOnlySequence<byte> lengthPrefixBuffer)
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\ExtensionResult.cs (2)
22public ExtensionResult(sbyte typeCode, ReadOnlySequence<byte> data) 30public ReadOnlySequence<byte> Data { get; private set; }
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (13)
49public MessagePackReader(in ReadOnlySequence<byte> readOnlySequence) 67/// Gets the <see cref="ReadOnlySequence{T}"/> originally supplied to the constructor. 69public ReadOnlySequence<byte> Sequence => this.reader.Sequence; 119public MessagePackReader Clone(in ReadOnlySequence<byte> readOnlySequence) => new MessagePackReader(readOnlySequence) 268public ReadOnlySequence<byte> ReadRaw(long length) 272ReadOnlySequence<byte> result = this.reader.Sequence.Slice(this.reader.Position, length); 289public ReadOnlySequence<byte> ReadRaw() 669public ReadOnlySequence<byte>? ReadBytes() 678ReadOnlySequence<byte> result = this.reader.Sequence.Slice(this.reader.Position, length); 694public ReadOnlySequence<byte>? ReadStringSequence() 703ReadOnlySequence<byte> result = this.reader.Sequence.Slice(this.reader.Position, length); 913ReadOnlySequence<byte> data = this.reader.Sequence.Slice(this.reader.Position, header.Length); 1092/// Reads a string assuming that it is spread across multiple spans in the <see cref="ReadOnlySequence{T}"/>.
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (7)
104public void WriteRaw(in ReadOnlySequence<byte> rawMessagePackBlock) 761public void Write(in ReadOnlySequence<byte> src) 779/// The caller should use <see cref="WriteRaw(in ReadOnlySequence{byte})"/> or <see cref="WriteRaw(ReadOnlySpan{byte})"/> 781/// Alternatively a single call to <see cref="Write(ReadOnlySpan{byte})"/> or <see cref="Write(in ReadOnlySequence{byte})"/> will take care of the header and content in one call. 837public void WriteString(in ReadOnlySequence<byte> utf8stringBytes) 872/// The caller should use <see cref="WriteRaw(in ReadOnlySequence{byte})"/> or <see cref="WriteRaw(ReadOnlySpan{byte})"/> 874/// Alternatively a single call to <see cref="WriteString(ReadOnlySpan{byte})"/> or <see cref="WriteString(in ReadOnlySequence{byte})"/> will take care of the header and content in one call.
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequenceReader.cs (5)
26private ReadOnlySequence<T> sequence; 55/// over the given <see cref="ReadOnlySequence{T}"/>. 58public SequenceReader(in ReadOnlySequence<T> sequence) 106/// Gets the underlying <see cref="ReadOnlySequence{T}"/> for the reader. 108public ReadOnlySequence<T> Sequence
Microsoft.AspNetCore.Components.Web (1)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
153var sequence = new ReadOnlySequence<char>(this, startIndex, tail, tail.Memory.Length);
Microsoft.AspNetCore.Http.Connections (12)
Internal\Transports\LongPollingServerTransport.cs (1)
37var buffer = result.Buffer;
Internal\Transports\ServerSentEventsServerTransport.cs (1)
52var buffer = result.Buffer;
Internal\Transports\WebSocketsServerTransport.cs (1)
209var buffer = result.Buffer;
ServerSentEventsMessageFormatter.cs (5)
15public static async Task WriteMessageAsync(ReadOnlySequence<byte> payload, Stream output, CancellationToken token) 46private static ReadOnlyMemory<byte> GetLastSegment(in ReadOnlySequence<byte> source, out long offset) 66private static async Task WriteMessageToMemory(Stream output, ReadOnlySequence<byte> payload) 73ReadOnlySequence<byte> lineSegment; 77payload = ReadOnlySequence<byte>.Empty;
src\aspnetcore\src\SignalR\common\Shared\StreamExtensions.cs (2)
14public static ValueTask WriteAsync(this Stream stream, ReadOnlySequence<byte> buffer, CancellationToken cancellationToken = default) 31private static async ValueTask WriteMultiSegmentAsync(Stream stream, ReadOnlySequence<byte> buffer, CancellationToken cancellationToken)
src\aspnetcore\src\SignalR\common\Shared\WebSocketExtensions.cs (2)
14public static ValueTask SendAsync(this WebSocket webSocket, ReadOnlySequence<byte> buffer, WebSocketMessageType webSocketMessageType, CancellationToken cancellationToken = default) 39private static async ValueTask SendMultiSegmentAsync(WebSocket webSocket, ReadOnlySequence<byte> buffer, WebSocketMessageType webSocketMessageType, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.HttpLogging (2)
BufferingStream.cs (2)
64var ros = new ReadOnlySequence<byte>(_head, 0, _tail, _tailBytesBuffered); 89EncodingExtensions.Convert(decoder, ReadOnlySequence<byte>.Empty, bufferWriter, flush: true, out charUsed, out completed);
Microsoft.AspNetCore.OutputCaching (12)
IOutputCacheBufferStore.cs (1)
32ValueTask SetAsync(string key, ReadOnlySequence<byte> value, ReadOnlyMemory<string> tags, TimeSpan validFor, CancellationToken cancellationToken);
OutputCacheEntry.cs (2)
62public ReadOnlySequence<byte> Body { get; private set; } 66internal void SetBody(ReadOnlySequence<byte> value, bool recycleBuffers)
OutputCacheEntryFormatter.cs (1)
166var body = entry.Body;
OutputCacheMiddleware.cs (2)
311var body = context.CachedResponse.Body; 426var cachedResponseBody = context.OutputCacheStream.GetCachedResponseBody();
RecyclableReadOnlySequenceSegment.cs (3)
62public static void RecycleChain(in ReadOnlySequence<byte> value, bool recycleBuffers = false) 79internal static ReadOnlySequence<byte> CreateSequence(IList<byte[]> segments) 102public static async ValueTask CopyToAsync(ReadOnlySequence<byte> source, PipeWriter destination, CancellationToken cancellationToken)
RecyclableSequenceBuilder.cs (2)
28internal ReadOnlySequence<byte> DetachAndReset() 48var payload = new ReadOnlySequence<byte>(_firstSegment, 0, _currentSegment!, _currentSegmentIndex);
Streams\OutputCacheStream.cs (1)
45internal ReadOnlySequence<byte> GetCachedResponseBody()
Microsoft.AspNetCore.Server.Kestrel.Core (109)
HttpsConnectionAdapterOptions.cs (3)
103/// If you want to store the bytes from the <see cref="ReadOnlySequence{T}"/>, 104/// copy them into a buffer that you control rather than keeping a reference to the <see cref="ReadOnlySequence{T}"/> or <see cref="ReadOnlyMemory{T}"/> instances. 111public Action<ConnectionContext, ReadOnlySequence<byte>>? TlsClientHelloBytesCallback { get; set; }
Internal\Http\Http1ChunkedEncodingMessageBody.cs (10)
116var readableBuffer = result.Buffer; 205private bool Read(ReadOnlySequence<byte> readableBuffer, PipeWriter writableBuffer, out SequencePosition consumed, out SequencePosition examined) 294private void ParseChunkedPrefix(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined) 360private void ParseExtension(ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined) 389var suffixBuffer = buffer.Slice(extensionCursor); 431private void ReadChunkedData(in ReadOnlySequence<byte> buffer, PipeWriter writableBuffer, out SequencePosition consumed, out SequencePosition examined) 448private void ParseChunkedSuffix(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined) 458var suffixBuffer = buffer.Slice(0, 2); 476private void ParseChunkedTrailer(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined) 486var trailerBuffer = buffer.Slice(0, 2);
Internal\Http\Http1Connection.cs (10)
204var trimmedBuffer = reader.Sequence.Slice(reader.Position, ServerOptions.Limits.MaxRequestLineSize); 246var trimmedBuffer = reader.Sequence.Slice(reader.Position, _remainingRequestHeadersBytesAllowed); 334var trimmedBuffer = reader.Sequence.Slice(reader.Position, ServerOptions.Limits.MaxRequestLineSize); 372var trimmedBuffer = reader.Sequence.Slice(reader.Position, _remainingRequestHeadersBytesAllowed); 989private void HandleBadRequest(ReadOnlySequence<byte> requestData, BadHttpRequestException ex) 998private void HandleBadRequest(ReadOnlySequence<byte> requestData, RequestRejectionReason reason) 1009private BadHttpRequestException CreateBadRequestException(HttpParseResult parseResult, ReadOnlySequence<byte> buffer) 1023var errorSlice = buffer.Slice(parseResult.ErrorOffset, parseResult.ErrorLength); 1034private void OnBadRequest(ReadOnlySequence<byte> requestData, BadHttpRequestException ex) 1049private void DetectHttp2Preface(ReadOnlySequence<byte> requestData)
Internal\Http\Http1ContentLengthMessageBody.cs (1)
216var buffer = _readResult.Buffer.Slice(consumed, _readResult.Buffer.End);
Internal\Http\HttpParser.cs (5)
117var currentSlice = reader.UnreadSequence; 175ReadOnlySequence<byte> header; 361private void ThrowParseError(HttpParseResult result, ReadOnlySequence<byte> buffer) 375var errorSlice = buffer.Slice(result.ErrorOffset, result.ErrorLength); 551reader.TryReadExact(requestLine.Length + 1, out var requestLineSequence);
Internal\Http\HttpRequestStream.cs (2)
125var buffer = result.Buffer; 135var slice = actual == length ? buffer : buffer.Slice(0, actual);
Internal\Http2\Http2Connection.cs (17)
325var buffer = result.Buffer; 339while (Http2FrameReader.TryReadFrame(ref buffer, _incomingFrame, _serverSettings.MaxFrameSize, out var framePayload)) 558var readableBuffer = result.Buffer; 637private bool ParseHttp1x(ReadOnlySequence<byte> buffer, out HttpVersion httpVersion) 662private static bool IsPreface(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined) 669var preface = buffer.Slice(0, ClientPreface.Length); 681private Task ProcessFrameAsync<TContext>(IHttpApplication<TContext> application, in ReadOnlySequence<byte> payload) where TContext : notnull 708private Task ProcessDataFrameAsync(in ReadOnlySequence<byte> payload) 790private Task ProcessHeadersFrameAsync<TContext>(IHttpApplication<TContext> application, in ReadOnlySequence<byte> payload) where TContext : notnull 854var headersPayload = payload.Slice(0, _incomingFrame.HeadersPayloadLength); // Minus padding 887var headersPayload = payload.Slice(0, _incomingFrame.HeadersPayloadLength); // Minus padding 995private Task ProcessSettingsFrameAsync(in ReadOnlySequence<byte> payload) 1079private Task ProcessPingFrameAsync(in ReadOnlySequence<byte> payload) 1200private Task ProcessContinuationFrameAsync(in ReadOnlySequence<byte> payload) 1244private Task DecodeHeadersAsync(bool endHeaders, in ReadOnlySequence<byte> payload) 1271private Task DecodeTrailersAsync(bool endHeaders, in ReadOnlySequence<byte> payload) 1908var bufferSlice = readResult.Buffer.Slice(0, copyAmount);
Internal\Http2\Http2FrameWriter.cs (8)
193var buffer = readResult.Buffer; 563private ValueTask<FlushResult> WriteDataAndTrailersAsync(Http2Stream stream, in ReadOnlySequence<byte> data, bool writeHeaders, HttpResponseTrailers headers) 715private void WriteDataUnsynchronized(int streamId, in ReadOnlySequence<byte> data, long dataLength, bool endStream) 742void TrimAndWriteDataUnsynchronized(in ReadOnlySequence<byte> data, long dataLength, bool endStream) 750var remainingData = data; 753var currentData = remainingData.Slice(0, dataPayloadLength); 781private ValueTask<FlushResult> WriteDataAsync(Http2Stream stream, ReadOnlySequence<byte> data, long dataLength, bool endStream, bool writeHeaders) 957public ValueTask<FlushResult> WritePingAsync(Http2PingFrameFlags flags, in ReadOnlySequence<byte> payload)
Internal\Http2\Http2KeepAlive.cs (1)
24internal static readonly ReadOnlySequence<byte> PingPayload = new ReadOnlySequence<byte>(new byte[8]);
Internal\Http2\Http2Stream.cs (2)
460public Task OnDataAsync(Http2Frame dataFrame, in ReadOnlySequence<byte> payload) 469var dataPayload = payload.Slice(0, dataFrame.DataPayloadLength); // minus padding
Internal\Http3\Http3ControlStream.cs (9)
161var readableBuffer = result.Buffer; 264var readableBuffer = result.Buffer; 273while (Http3FrameReader.TryReadFrame(ref readableBuffer, incomingFrame, isContinuedFrame, out var framePayload)) 324private ValueTask ProcessHttp3ControlStream(Http3RawFrame incomingFrame, bool isContinuedFrame, in ReadOnlySequence<byte> payload, out SequencePosition consumed) 360private ValueTask ProcessSettingsFrameAsync(bool isContinuedFrame, ReadOnlySequence<byte> payload, out SequencePosition consumed) 422private ValueTask ProcessGoAwayFrameAsync(bool isContinuedFrame, Http3RawFrame incomingFrame, ReadOnlySequence<byte> payload, out SequencePosition consumed) 444private ValueTask ProcessCancelPushFrameAsync(Http3RawFrame incomingFrame, ReadOnlySequence<byte> payload, out SequencePosition consumed) 456private ValueTask ProcessMaxPushIdFrameAsync(Http3RawFrame incomingFrame, ReadOnlySequence<byte> payload, out SequencePosition consumed) 479private static void ParseVarIntWithFrameLengthValidation(Http3RawFrame incomingFrame, ReadOnlySequence<byte> payload, out SequencePosition consumed)
Internal\Http3\Http3FrameReader.cs (5)
24internal static bool TryReadFrame(ref ReadOnlySequence<byte> readableBuffer, Http3RawFrame frame, bool isContinuedFrame, out ReadOnlySequence<byte> framePayload) 26framePayload = ReadOnlySequence<byte>.Empty; 37var firstLengthBuffer = readableBuffer.Slice(consumed); 48var startOfFramePayload = readableBuffer.Slice(consumed);
Internal\Http3\Http3FrameWriter.cs (5)
160public ValueTask<FlushResult> WriteDataAsync(in ReadOnlySequence<byte> data) 177private void WriteDataUnsynchronized(in ReadOnlySequence<byte> data, long dataLength) 200void SplitAndWriteDataUnsynchronized(in ReadOnlySequence<byte> data, long dataLength) 208var remainingData = data; 211var currentData = remainingData.Slice(0, dataPayloadLength);
Internal\Http3\Http3PendingStream.cs (1)
57var readableBuffer = result.Buffer;
Internal\Http3\Http3Stream.cs (5)
644var readableBuffer = result.Buffer; 652while (Http3FrameReader.TryReadFrame(ref readableBuffer, incomingFrame, isContinuedFrame, out var framePayload)) 788in ReadOnlySequence<byte> payload, bool isCompleted) where TContext : notnull 816ReadOnlySequence<byte> payload, bool isCompleted) where TContext : notnull 927private Task ProcessDataFrameAsync(in ReadOnlySequence<byte> payload)
Internal\Http3\QPack\DecoderStreamReader.cs (1)
53public void Read(ReadOnlySequence<byte> data)
Internal\Http3\QPack\EncoderStreamReader.cs (1)
100public void Read(ReadOnlySequence<byte> data)
ListenOptionsHttpsExtensions.cs (1)
304public static ListenOptions UseTlsClientHelloListener(this ListenOptions listenOptions, Action<ConnectionContext, ReadOnlySequence<byte>> tlsClientHelloBytesCallback, TimeSpan? timeout = null)
Middleware\TlsListener.cs (6)
12private readonly Action<ConnectionContext, ReadOnlySequence<byte>> _tlsClientHelloBytesCallback; 14public TlsListener(Action<ConnectionContext, ReadOnlySequence<byte>> tlsClientHelloBytesCallback) 34var buffer = result.Buffer; 45parseState = TryParseClientHello(buffer, ref recordLength, out var clientHelloBytes); 88private static ClientHelloParseState TryParseClientHello(ReadOnlySequence<byte> buffer, ref short recordLength, out ReadOnlySequence<byte> clientHelloBytes)
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
126public void Decode(in ReadOnlySequence<byte> data, bool endHeaders, IHttpStreamHeadersHandler handler)
src\aspnetcore\src\Shared\runtime\Http3\Helpers\VariableLengthIntegerHelper.cs (1)
132public static bool TryGetInteger(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out long integer)
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
166public void Decode(in ReadOnlySequence<byte> data, bool endHeaders, IHttpStreamHeadersHandler handler)
src\aspnetcore\src\Shared\ServerInfrastructure\BufferExtensions.cs (6)
22public static ReadOnlySpan<byte> ToSpan(in this ReadOnlySequence<byte> buffer) 32public static void CopyTo(in this ReadOnlySequence<byte> buffer, PipeWriter pipeWriter) 44private static void CopyToMultiSegment(in ReadOnlySequence<byte> buffer, PipeWriter pipeWriter) 67/// Returns position of first occurrence of item in the <see cref="ReadOnlySequence{T}"/> 70public static SequencePosition? PositionOfAny<T>(in this ReadOnlySequence<T> source, T value0, T value1) where T : IEquatable<T> 88private static SequencePosition? PositionOfAnyMultiSegment<T>(in ReadOnlySequence<T> source, T value0, T value1) where T : IEquatable<T>
src\aspnetcore\src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
src\aspnetcore\src\Shared\ServerInfrastructure\Http2\Http2FrameReader.cs (6)
39public static bool TryReadFrame(ref ReadOnlySequence<byte> buffer, Http2Frame frame, uint maxFrameSize, out ReadOnlySequence<byte> framePayload) 41framePayload = ReadOnlySequence<byte>.Empty; 48var headerSlice = buffer.Slice(0, HeaderLength); 78private static int ReadExtendedFields(Http2Frame frame, in ReadOnlySequence<byte> readableBuffer) 226public static IList<Http2PeerSetting> ReadSettings(in ReadOnlySequence<byte> payload)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicStreamContext.cs (1)
397var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Common (14)
Protocol\HandshakeProtocol.cs (4)
116public static bool TryParseResponseMessage(ref ReadOnlySequence<byte> buffer, [NotNullWhen(true)] out HandshakeResponseMessage? responseMessage) 118if (!TextMessageParser.TryParseMessage(ref buffer, out var payload)) 170public static bool TryParseRequestMessage(ref ReadOnlySequence<byte> buffer, [NotNullWhen(true)] out HandshakeRequestMessage? requestMessage) 172if (!TextMessageParser.TryParseMessage(ref buffer, out var payload))
Protocol\IHubProtocol.cs (1)
38bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message);
Protocol\RawResult.cs (2)
27public RawResult(ReadOnlySequence<byte> rawBytes) 36public ReadOnlySequence<byte> RawSerializedData { get; private set; }
src\aspnetcore\src\SignalR\common\Shared\TextMessageParser.cs (4)
13public static bool TryParseMessage(ref ReadOnlySequence<byte> buffer, out ReadOnlySequence<byte> payload) 37private static bool TryParseMessageMultiSegment(ref ReadOnlySequence<byte> buffer, out ReadOnlySequence<byte> payload)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextReader.cs (3)
15private ReadOnlySequence<byte> _utf8Buffer; 29public static Utf8BufferTextReader Get(in ReadOnlySequence<byte> utf8Buffer) 59public void SetBuffer(in ReadOnlySequence<byte> utf8Buffer)
Microsoft.AspNetCore.SignalR.Core (4)
HubConnectionContext.cs (2)
549var buffer = result.Buffer; 564var segment = buffer;
HubConnectionHandler.cs (2)
274var buffer = result.Buffer; 309var segment = buffer;
Microsoft.AspNetCore.SignalR.Protocols.Json (12)
Protocol\JsonHubProtocol.cs (5)
89public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 91if (!TextMessageParser.TryParseMessage(ref input, out var payload)) 115private HubMessage? ParseMessage(ReadOnlySequence<byte> input, IInvocationBinder binder) 814private object? BindType(ref Utf8JsonReader reader, ReadOnlySequence<byte> input, Type type) 821var sequence = input.Slice(start, end - start);
src\aspnetcore\src\SignalR\common\Shared\TextMessageParser.cs (4)
13public static bool TryParseMessage(ref ReadOnlySequence<byte> buffer, out ReadOnlySequence<byte> payload) 37private static bool TryParseMessageMultiSegment(ref ReadOnlySequence<byte> buffer, out ReadOnlySequence<byte> payload)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextReader.cs (3)
15private ReadOnlySequence<byte> _utf8Buffer; 29public static Utf8BufferTextReader Get(in ReadOnlySequence<byte> utf8Buffer) 59public void SetBuffer(in ReadOnlySequence<byte> utf8Buffer)
Microsoft.AspNetCore.WebUtilities (7)
FormPipeReader.cs (7)
98var buffer = readResult.Buffer; 132ref ReadOnlySequence<byte> buffer, 235ref ReadOnlySequence<byte> buffer, 240ReadOnlySequence<byte> keyValuePair; 276ReadOnlySequence<byte> value; 278if (keyValueReader.TryReadTo(out ReadOnlySequence<byte> key, equalsDelimiter)) 345private string GetDecodedStringFromReadOnlySequence(in ReadOnlySequence<byte> ros)
Microsoft.Extensions.Caching.Abstractions (3)
Hybrid\IHybridCacheSerializer.cs (1)
17T Deserialize(ReadOnlySequence<byte> source);
IBufferDistributedCache.cs (2)
41void Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options); 51ValueTask SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token = default);
Microsoft.Extensions.Caching.Hybrid (7)
Internal\BufferChunk.cs (1)
92internal ReadOnlySequence<byte> AsSequence() => Length == 0 ? default : new ReadOnlySequence<byte>(OversizedArray!, Offset, Length);
Internal\DefaultJsonSerializerFactory.cs (1)
148T IHybridCacheSerializer<T>.Deserialize(ReadOnlySequence<byte> source)
Internal\HybridCachePayload.cs (1)
102string key, long creationTime, TimeSpan duration, PayloadFlags flags, TagSet tags, ReadOnlySequence<byte> payload)
Internal\InbuiltTypeSerializer.cs (3)
19string IHybridCacheSerializer<string>.Deserialize(ReadOnlySequence<byte> source) 25byte[] IHybridCacheSerializer<byte[]>.Deserialize(ReadOnlySequence<byte> source) 31internal static string DeserializeString(ReadOnlySequence<byte> source)
Internal\RecyclableArrayBufferWriter.cs (1)
134public ReadOnlySequence<T> AsSequence() => new(_buffer, 0, _index);
Microsoft.Extensions.Caching.Hybrid.Tests (14)
BufferReleaseTests.cs (2)
92void IBufferDistributedCache.Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options) 95ValueTask IBufferDistributedCache.SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token)
DistributedCacheTests.cs (4)
182var payload = Invent(size, kind); 244var payload = Invent(size, kind); 277private static ReadOnlySequence<byte> Invent(int size, SequenceKind kind) 280ReadOnlySequence<byte> payload;
L2Tests.cs (2)
165void IBufferDistributedCache.Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options) 172ValueTask IBufferDistributedCache.SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token)
SerializerTests.cs (3)
303private static ReadOnlySequence<byte> Split(ReadOnlySequence<byte> value) 316var result = new ReadOnlySequence<byte>(first, 0, second, chunk.Length - 1);
ServiceConstructionTests.cs (1)
671Customer IHybridCacheSerializer<Customer>.Deserialize(ReadOnlySequence<byte> source) => throw new NotSupportedException();
SizeTests.cs (2)
288public MutablePoco Deserialize(ReadOnlySequence<byte> source) 331public ImmutablePoco Deserialize(ReadOnlySequence<byte> source)
mscorlib (1)
mscorlib.cs (1)
43[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
netstandard (1)
netstandard.cs (1)
70[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
System.IO.Pipelines (19)
System\IO\Pipelines\Pipe.cs (1)
973var readOnlySequence = new ReadOnlySequence<byte>(head, _readHeadIndex, _readTail, _readTailIndex);
System\IO\Pipelines\PipeReader.cs (5)
71ReadOnlySequence<byte> buffer = result.Buffer; 164/// Creates a <see cref="PipeReader"/> wrapping the specified <see cref="ReadOnlySequence{T}"/>. 167/// <returns>A <see cref="PipeReader"/> that wraps the <see cref="ReadOnlySequence{T}"/>.</returns> 168public static PipeReader Create(ReadOnlySequence<byte> sequence) 237ReadOnlySequence<byte> buffer = result.Buffer;
System\IO\Pipelines\PipeReaderStream.cs (2)
118ReadOnlySequence<byte> sequence = result.Buffer; 128ReadOnlySequence<byte> slice = actual == bufferLength ? sequence : sequence.Slice(0, actual);
System\IO\Pipelines\ReadResult.cs (4)
11internal readonly ReadOnlySequence<byte> _resultBuffer; 18public ReadResult(ReadOnlySequence<byte> buffer, bool isCanceled, bool isCompleted) 33/// <summary>Gets the <see cref="System.Buffers.ReadOnlySequence{T}" /> that was read.</summary> 35public ReadOnlySequence<byte> Buffer => _resultBuffer;
System\IO\Pipelines\SequencePipeReader.cs (5)
12private ReadOnlySequence<byte> _sequence; 17public SequencePipeReader(ReadOnlySequence<byte> sequence) 36_sequence = ReadOnlySequence<byte>.Empty; 58_sequence = ReadOnlySequence<byte>.Empty; 69result = new ReadResult(ReadOnlySequence<byte>.Empty, isCanceled: false, isCompleted: true);
System\IO\Pipelines\StreamPipeReader.cs (2)
472ReadOnlySequence<byte> buffer = GetCurrentReadOnlySequence(); 482private ReadOnlySequence<byte> GetCurrentReadOnlySequence()
System.Memory (112)
System\Buffers\BuffersExtensions.cs (10)
9/// Extension methods for <see cref="ReadOnlySequence{T}"/> 14/// Returns position of first occurrence of item in the <see cref="ReadOnlySequence{T}"/> 17public static SequencePosition? PositionOf<T>(in this ReadOnlySequence<T> source, T value) where T : IEquatable<T>? 35private static SequencePosition? PositionOfMultiSegment<T>(in ReadOnlySequence<T> source, T value) where T : IEquatable<T>? 58/// Copy the <see cref="ReadOnlySequence{T}"/> to the specified <see cref="Span{Byte}"/>. 60/// <param name="source">The source <see cref="ReadOnlySequence{T}"/>.</param> 63public static void CopyTo<T>(in this ReadOnlySequence<T> source, Span<T> destination) 78private static void CopyToMultiSegment<T>(in ReadOnlySequence<T> sequence, Span<T> destination) 100/// Converts the <see cref="ReadOnlySequence{T}"/> to an array 102public static T[] ToArray<T>(in this ReadOnlySequence<T> sequence)
System\Buffers\ReadOnlySequence.cs (43)
24/// Returns empty <see cref="ReadOnlySequence{T}"/> 26public static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(Array.Empty<T>()); 29/// Length of the <see cref="ReadOnlySequence{T}"/>. 34/// Determines if the <see cref="ReadOnlySequence{T}"/> is empty. 39/// Determines if the <see cref="ReadOnlySequence{T}"/> contains a single <see cref="ReadOnlyMemory{T}"/> segment. 58/// A position to the start of the <see cref="ReadOnlySequence{T}"/>. 67/// A position to the end of the <see cref="ReadOnlySequence{T}"/> 91/// Creates an instance of <see cref="ReadOnlySequence{T}"/> from linked memory list represented by start and end segments 111/// Creates an instance of <see cref="ReadOnlySequence{T}"/> from the array. 125/// Creates an instance of <see cref="ReadOnlySequence{T}"/> from the array, start, and index. 141/// Creates an instance of <see cref="ReadOnlySequence{T}"/> from the <see cref="ReadOnlyMemory{T}"/>. 142/// Consumer is expected to manage lifetime of memory until <see cref="ReadOnlySequence{T}"/> is not used anymore. 184/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/>, with <paramref name="length"/> items. 189public ReadOnlySequence<T> Slice(long start, long length) 260/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/> and ending at <paramref name="end"/> (exclusive). 265public ReadOnlySequence<T> Slice(long start, SequencePosition end) 339/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/>, with <paramref name="length"/> items. 344public ReadOnlySequence<T> Slice(SequencePosition start, long length) 422/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/>, with <paramref name="length"/> items. 427public ReadOnlySequence<T> Slice(int start, int length) => Slice((long)start, length); 430/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/> and ending at <paramref name="end"/> (exclusive). 435public ReadOnlySequence<T> Slice(int start, SequencePosition end) => Slice((long)start, end); 438/// Forms a slice out of the current <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/>, with <paramref name="length"/> items. 443public ReadOnlySequence<T> Slice(SequencePosition start, int length) => Slice(start, (long)length); 446/// Forms a slice out of the given <see cref="ReadOnlySequence{T}"/>, beginning at <paramref name="start"/>, ending at <paramref name="end"/> (exclusive). 452public ReadOnlySequence<T> Slice(SequencePosition start, SequencePosition end) 459/// Forms a slice out of the current <see cref="ReadOnlySequence{T}" />, beginning at a specified sequence position and continuing to the end of the read-only sequence. 464public ReadOnlySequence<T> Slice(SequencePosition start) 472/// Forms a slice out of the current <see cref="ReadOnlySequence{T}" /> , beginning at a specified index and continuing to the end of the read-only sequence. 476public ReadOnlySequence<T> Slice(long start) 493ReadOnlySequence<T> localThis = this; 494ReadOnlySequence<char> charSequence = Unsafe.As<ReadOnlySequence<T>, ReadOnlySequence<char>>(ref localThis); 511/// Returns an enumerator over the <see cref="ReadOnlySequence{T}"/> 601/// Returns <code>false</code> if end of <see cref="ReadOnlySequence{T}"/> was reached otherwise <code>true</code>. 616/// An enumerator over the <see cref="ReadOnlySequence{T}"/> 620private readonly ReadOnlySequence<T> _sequence; 625/// <param name="sequence">The <see cref="ReadOnlySequence{T}"/> to enumerate.</param> 626public Enumerator(in ReadOnlySequence<T> sequence) 639/// Moves to the next <see cref="ReadOnlyMemory{T}"/> in the <see cref="ReadOnlySequence{T}"/> 665/// Flag that allows encoding the <see cref="ReadOnlySequence{T}.SequenceType"/>. 667/// <seealso cref="ReadOnlySequence{T}.GetSequenceType"/>
System\Buffers\ReadOnlySequence.Helpers.cs (2)
467private ReadOnlySequence<T> SliceImpl(in SequencePosition start, in SequencePosition end) 482private ReadOnlySequence<T> SliceImpl(in SequencePosition start)
System\Buffers\ReadOnlySequenceDebugView.cs (1)
14public ReadOnlySequenceDebugView(ReadOnlySequence<T> sequence)
System\Buffers\SequenceReader.cs (5)
17/// Create a <see cref="SequenceReader{T}"/> over the given <see cref="ReadOnlySequence{T}"/>. 20public SequenceReader(ReadOnlySequence<T> sequence) 45/// The underlying <see cref="ReadOnlySequence{T}"/> for the reader. 47public ReadOnlySequence<T> Sequence { get; } 55public readonly ReadOnlySequence<T> UnreadSequence => Sequence.Slice(Position);
System\Buffers\SequenceReader.Search.cs (12)
35if (!TryReadToInternal(out ReadOnlySequence<T> sequence, delimiter, advancePastDelimiter, CurrentSpan.Length - CurrentSpanIndex)) 72if (!TryReadToSlow(out ReadOnlySequence<T> sequence, delimiter, delimiterEscape, index, advancePastDelimiter)) 83private bool TryReadToSlow(out ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, int index, bool advancePastDelimiter) 188public bool TryReadTo(out ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter = true) 193private bool TryReadToInternal(out ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter, int skip = 0) 239public bool TryReadTo(out ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = true) 347if (!TryReadToAnyInternal(out ReadOnlySequence<T> sequence, delimiters, advancePastDelimiter, CurrentSpan.Length - CurrentSpanIndex)) 364public bool TryReadToAny(out ReadOnlySequence<T> sequence, scoped ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) 369private bool TryReadToAnyInternal(out ReadOnlySequence<T> sequence, scoped ReadOnlySpan<T> delimiters, bool advancePastDelimiter, int skip = 0) 433if (!TryReadTo(out ReadOnlySequence<T> sequence, delimiter, advancePastDelimiter)) 451public bool TryReadTo(out ReadOnlySequence<T> sequence, scoped ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true) 511public bool TryReadExact(int count, out ReadOnlySequence<T> sequence)
System\Runtime\InteropServices\SequenceMarshal.cs (9)
10/// Provides a collection of methods for interoperating with <see cref="ReadOnlySequence{T}"/> 15/// Get <see cref="ReadOnlySequenceSegment{T}"/> from the underlying <see cref="ReadOnlySequence{T}"/>. 18public static bool TryGetReadOnlySequenceSegment<T>(ReadOnlySequence<T> sequence, 28/// Get an array segment from the underlying <see cref="ReadOnlySequence{T}"/>. 31public static bool TryGetArray<T>(ReadOnlySequence<T> sequence, out ArraySegment<T> segment) 37/// Get <see cref="ReadOnlyMemory{T}"/> from the underlying <see cref="ReadOnlySequence{T}"/>. 40public static bool TryGetReadOnlyMemory<T>(ReadOnlySequence<T> sequence, out ReadOnlyMemory<T> memory) 53/// Get <see cref="string"/> from the underlying <see cref="ReadOnlySequence{T}"/>. 56internal static bool TryGetString(ReadOnlySequence<char> sequence, [NotNullWhen(true)] out string? text, out int start, out int length)
System\SequencePosition.cs (2)
41/// <see cref="SequencePosition"/> equality does not guarantee that they point to the same location in <see cref="System.Buffers.ReadOnlySequence{T}" /> 47/// <see cref="SequencePosition"/> equality does not guarantee that they point to the same location in <see cref="System.Buffers.ReadOnlySequence{T}" />
System\Text\EncodingExtensions.cs (28)
61/// Decodes the specified <see cref="ReadOnlySequence{Char}"/> to <see langword="byte"/>s using the specified <see cref="Encoding"/> 65/// <param name="chars">The <see cref="ReadOnlySequence{Char}"/> whose contents should be encoded.</param> 70public static long GetBytes(this Encoding encoding, in ReadOnlySequence<char> chars, IBufferWriter<byte> writer) 90/// Encodes the specified <see cref="ReadOnlySequence{Char}"/> to <see langword="byte"/>s using the specified <see cref="Encoding"/> 94/// <param name="chars">The <see cref="ReadOnlySequence{Char}"/> to encode to <see langword="byte"/>s.</param> 100public static int GetBytes(this Encoding encoding, in ReadOnlySequence<char> chars, Span<byte> bytes) 115ReadOnlySequence<char> remainingChars = chars; 135/// Encodes the specified <see cref="ReadOnlySequence{Char}"/> into a <see cref="byte"/> array using the specified <see cref="Encoding"/>. 138/// <param name="chars">The <see cref="ReadOnlySequence{Char}"/> to encode to <see langword="byte"/>s.</param> 142public static byte[] GetBytes(this Encoding encoding, in ReadOnlySequence<char> chars) 169ReadOnlySequence<char> remainingChars = chars; 252/// Decodes the specified <see cref="ReadOnlySequence{Byte}"/> to <see langword="char"/>s using the specified <see cref="Encoding"/> 256/// <param name="bytes">The <see cref="ReadOnlySequence{Byte}"/> whose bytes should be decoded.</param> 261public static long GetChars(this Encoding encoding, in ReadOnlySequence<byte> bytes, IBufferWriter<char> writer) 281/// Decodes the specified <see cref="ReadOnlySequence{Byte}"/> to <see langword="char"/>s using the specified <see cref="Encoding"/> 285/// <param name="bytes">The <see cref="ReadOnlySequence{Byte}"/> to decode to characters.</param> 291public static int GetChars(this Encoding encoding, in ReadOnlySequence<byte> bytes, Span<char> chars) 306ReadOnlySequence<byte> remainingBytes = bytes; 326/// Decodes the specified <see cref="ReadOnlySequence{Byte}"/> into a <see cref="string"/> using the specified <see cref="Encoding"/>. 329/// <param name="bytes">The <see cref="ReadOnlySequence{Byte}"/> to decode into characters.</param> 333public static string GetString(this Encoding encoding, in ReadOnlySequence<byte> bytes) 356ReadOnlySequence<byte> remainingBytes = bytes; 449/// Converts a <see cref="ReadOnlySequence{Char}"/> to encoded bytes and writes the result to <paramref name="writer"/>. 461public static void Convert(this Encoder encoder, in ReadOnlySequence<char> chars, IBufferWriter<byte> writer, bool flush, out long bytesUsed, out bool completed) 471ReadOnlySequence<char> remainingChars = chars; 542/// Converts a <see cref="ReadOnlySequence{Byte}"/> to UTF-16 encoded characters and writes the result to <paramref name="writer"/>. 555public static void Convert(this Decoder decoder, in ReadOnlySequence<byte> bytes, IBufferWriter<char> writer, bool flush, out long charsUsed, out bool completed) 565ReadOnlySequence<byte> remainingBytes = bytes;
System.Net.Http (3)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (1)
126public void Decode(in ReadOnlySequence<byte> data, bool endHeaders, IHttpStreamHeadersHandler handler)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\Helpers\VariableLengthIntegerHelper.cs (1)
132public static bool TryGetInteger(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out long integer)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (1)
166public void Decode(in ReadOnlySequence<byte> data, bool endHeaders, IHttpStreamHeadersHandler handler)
System.Text.Json (33)
System\Text\Json\Document\JsonDocument.Parse.cs (5)
57/// The <see cref="ReadOnlySequence{T}"/> may be used for the entire lifetime of the 77public static JsonDocument Parse(ReadOnlySequence<byte> utf8Json, JsonDocumentOptions options = default) 460ReadOnlySequence<byte> valueSequence = default; 515ReadOnlySequence<byte> sequence = reader.OriginalSequence; 572ReadOnlySequence<byte> sequence = reader.OriginalSequence;
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (1)
121public static unsafe bool UnescapeAndCompare(ReadOnlySequence<byte> utf8Source, ReadOnlySpan<byte> other)
System\Text\Json\Reader\Utf8JsonReader.cs (6)
47private readonly ReadOnlySequence<byte> _sequence; 51internal readonly ReadOnlySequence<byte> OriginalSequence => _sequence; 160public ReadOnlySequence<byte> ValueSequence { get; private set; } 247ValueSequence = ReadOnlySequence<byte>.Empty; 583ReadOnlySequence<byte> localSequence = ValueSequence; 636ReadOnlySequence<byte> localSequence = ValueSequence;
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (4)
24public Utf8JsonReader(ReadOnlySequence<byte> jsonData, bool isFinalBlock, JsonReaderState state) 54ValueSequence = ReadOnlySequence<byte>.Empty; 115public Utf8JsonReader(ReadOnlySequence<byte> jsonData, JsonReaderOptions options = default) 2201ReadOnlySequence<byte> commentSequence = _sequence.Slice(start, end);
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (3)
98ReadOnlySequence<byte> valueSequence = ValueSequence; 168ReadOnlySequence<byte> valueSequence = ValueSequence; 205ReadOnlySequence<byte> valueSequence = ValueSequence;
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
57ReadOnlySequence<byte> originalSequence = reader.OriginalSequence;
System\Text\Json\Serialization\IReadBufferState.cs (1)
17public abstract ReadOnlySequence<byte> Bytes { get; }
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (3)
326ReadOnlySequence<byte> valueSequence = default; 371ReadOnlySequence<byte> sequence = reader.OriginalSequence; 410ReadOnlySequence<byte> originalSequence = reader.OriginalSequence;
System\Text\Json\Serialization\PipeReadBufferState.cs (7)
18private ReadOnlySequence<byte> _sequence = ReadOnlySequence<byte>.Empty; 31public readonly ReadOnlySequence<byte> Bytes => _sequence; 45_sequence = ReadOnlySequence<byte>.Empty; 55Debug.Assert(_sequence.Equals(ReadOnlySequence<byte>.Empty), "ReadAsync should only be called when the buffer is empty."); 141if (_sequence.Equals(ReadOnlySequence<byte>.Empty)) 150_sequence = ReadOnlySequence<byte>.Empty;
System\Text\Json\Serialization\StreamReadBufferState.cs (1)
55public readonly ReadOnlySequence<byte> Bytes => new(_buffer.AsMemory(_offset, _count));
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (1)
134public void WriteRawValue(ReadOnlySequence<byte> utf8Json, bool skipInputValidation = false)