31 instantiations of SequencePosition
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (6)
System.Memory (16)
System\Buffers\ReadOnlySequence.cs (10)
63get => new SequencePosition(_startObject, GetIndex(_startInteger));
72get => new SequencePosition(_endObject, GetIndex(_endInteger));
214begin = new SequencePosition(startObject, startIndex);
238end = new SequencePosition(beginObject, beginIndex + (int)length);
248begin = new SequencePosition(startObject, startIndex);
253end = new SequencePosition(startObject, startIndex + (int)length);
335return SliceImpl(new SequencePosition(startObject, (int)startIndex + (int)start), new SequencePosition(sliceEndObject, (int)sliceEndIndex));
418return SliceImpl(new SequencePosition(sliceStartObject, (int)sliceStartIndex), new SequencePosition(sliceStartObject, (int)sliceStartIndex + (int)length));
System.Text.Json (9)
353 references to SequencePosition
Aspire.Hosting (2)
ClientSample (1)
http2cat (4)
IIS.FunctionalTests (4)
IIS.LongTests (4)
IIS.NewHandler.FunctionalTests (4)
IIS.NewShim.FunctionalTests (4)
IIS.ShadowCopy.Tests (4)
IISExpress.FunctionalTests (4)
InMemory.FunctionalTests (19)
Microsoft.AspNetCore.Components.Server (9)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
Microsoft.AspNetCore.Server.IIS (4)
Microsoft.AspNetCore.Server.Kestrel.Core (58)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (18)
36public override void AdvanceTo(SequencePosition consumed, SequencePosition examined)
114var consumed = readableBuffer.Start;
115var examined = readableBuffer.Start;
202private bool Read(ReadOnlySequence<byte> readableBuffer, PipeWriter writableBuffer, out SequencePosition consumed, out SequencePosition examined)
291private void ParseChunkedPrefix(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined)
348private void ParseExtension(ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined)
356SequencePosition? extensionCursorPosition = buffer.PositionOf(ByteCR);
366var extensionCursor = extensionCursorPosition.Value;
400private void ReadChunkedData(in ReadOnlySequence<byte> buffer, PipeWriter writableBuffer, out SequencePosition consumed, out SequencePosition examined)
417private void ParseChunkedSuffix(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined)
445private void ParseChunkedTrailer(in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (51)
HttpParserTests.cs (28)
41Assert.True(ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
60Assert.False(ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
71Assert.False(ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
88ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
108Assert.True(ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
122ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
141ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
169ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
187ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
530ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
541ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined));
570var result = ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined);
589ParseRequestLine(parser, requestHandler, buffer, out var consumed, out var examined);
798private bool ParseRequestLine(IHttpParser<RequestHandler> parser, RequestHandler requestHandler, ReadOnlySequence<byte> readableBuffer, out SequencePosition consumed, out SequencePosition examined)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (12)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Microsoft.AspNetCore.Shared.Tests (10)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.SignalR.Microbenchmarks (4)
Microsoft.AspNetCore.SignalR.Tests (3)
Microsoft.AspNetCore.WebUtilities (1)
mscorlib (1)
netstandard (1)
Sockets.FunctionalTests (6)
System.IO.Pipelines (22)
System.Memory (72)
System\Buffers\ReadOnlySequence.cs (31)
60public SequencePosition Start
69public SequencePosition End
194SequencePosition begin;
195SequencePosition end;
263/// <param name="end">The ending (exclusive) <see cref="SequencePosition"/> of the slice.</param>
265public ReadOnlySequence<T> Slice(long start, SequencePosition end)
328SequencePosition begin = SeekMultiSegment(startSegment.Next!, sliceEndObject, (int)sliceEndIndex, start - currentLength, ExceptionArgument.start);
341/// <param name="start">The starting (inclusive) <see cref="SequencePosition"/> at which to begin this slice.</param>
344public ReadOnlySequence<T> Slice(SequencePosition start, long length)
411SequencePosition end = SeekMultiSegment(sliceStartSegment.Next!, endObject, (int)endIndex, length - currentLength, ExceptionArgument.length);
433/// <param name="end">The ending (exclusive) <see cref="SequencePosition"/> of the slice.</param>
435public ReadOnlySequence<T> Slice(int start, SequencePosition end) => Slice((long)start, end);
440/// <param name="start">The starting (inclusive) <see cref="SequencePosition"/> at which to begin this slice.</param>
443public ReadOnlySequence<T> Slice(SequencePosition start, int length) => Slice(start, (long)length);
448/// <param name="start">The starting (inclusive) <see cref="SequencePosition"/> at which to begin this slice.</param>
449/// <param name="end">The ending (exclusive) <see cref="SequencePosition"/> of the slice.</param>
452public ReadOnlySequence<T> Slice(SequencePosition start, SequencePosition end)
461/// <param name="start">The starting (inclusive) <see cref="SequencePosition"/> at which to begin this slice.</param>
464public ReadOnlySequence<T> Slice(SequencePosition start)
484SequencePosition begin = Seek(start, ExceptionArgument.start);
516/// Returns a new <see cref="SequencePosition"/> at an <paramref name="offset"/> from the start of the sequence.
518public SequencePosition GetPosition(long offset)
529/// <param name="position">The <see cref="System.SequencePosition"/> of which to get the offset.</param>
532public long GetOffset(SequencePosition position)
585/// Returns a new <see cref="SequencePosition"/> at an <paramref name="offset"/> from the <paramref name="origin"/>
587public SequencePosition GetPosition(long offset, SequencePosition origin)
600public bool TryGet(ref SequencePosition position, out ReadOnlyMemory<T> memory, bool advance = true)
602bool result = TryGetBuffer(position, out memory, out SequencePosition next);
617private SequencePosition _next;
System\Buffers\ReadOnlySequence.Helpers.cs (12)
14internal bool TryGetBuffer(in SequencePosition position, out ReadOnlyMemory<T> memory, out SequencePosition next)
235internal SequencePosition Seek(long offset, ExceptionArgument exceptionArgument = ExceptionArgument.offset)
271private SequencePosition Seek(in SequencePosition start, long offset)
307private static SequencePosition SeekMultiSegment(ReadOnlySequenceSegment<T>? currentSegment, object endObject, int endIndex, long offset, ExceptionArgument argument)
333private void BoundsCheck(in SequencePosition position, bool positionIsNotNull)
423private static SequencePosition GetEndPosition(ReadOnlySequenceSegment<T> startSegment, object startObject, int startIndex, object endObject, int endIndex, long length)
467private ReadOnlySequence<T> SliceImpl(in SequencePosition start, in SequencePosition end)
482private ReadOnlySequence<T> SliceImpl(in SequencePosition start)
630internal void GetFirstSpan(out ReadOnlySpan<T> first, out SequencePosition next)
System.Net.Http (2)
System.Text.Json (27)