26 references to ReadResult
InMemory.FunctionalTests (2)
Http3\WebTransport\WebTransportTestUtilities.cs (2)
193return new ValueTask<ReadResult>(new ReadResult( 199result = new ReadResult(new ReadOnlySequence<byte>((ReadOnlyMemory<byte>)_sharedMemory), false, true);
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\Http\Http1ContentLengthMessageBody.cs (5)
39return new ReadResult(_readResult.Buffer, Interlocked.Exchange(ref _userCanceled, 0) == 1, isCompleted: true); 126readResult = new ReadResult(_readResult.Buffer, Interlocked.Exchange(ref _userCanceled, 0) == 1, isCompleted: true); 196_readResult = new ReadResult( 221_readResult = new ReadResult(new ReadOnlySequence<byte>(), isCanceled: false, isCompleted: true); 230_readResult = new ReadResult(buffer, isCanceled: false, isCompleted: true);
Internal\Http\ZeroContentLengthMessageBody.cs (2)
18public override ValueTask<ReadResult> ReadAsync(CancellationToken cancellationToken = default) => new ValueTask<ReadResult>(new ReadResult(default, isCanceled: false, isCompleted: true)); 28result = new ReadResult(default, isCanceled: false, isCompleted: true);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
HttpRequestStreamTests.cs (1)
112mockMessageBody.Setup(m => m.ReadAsync(CancellationToken.None)).Returns(new ValueTask<ReadResult>(new ReadResult(default, isCanceled: false, isCompleted: true)));
Microsoft.AspNetCore.SignalR.Microbenchmarks (9)
HubConnectionContextBenchmark.cs (1)
32_handshakeRequestResult = new ReadResult(new ReadOnlySequence<byte>(memoryBufferWriter.ToArray()), false, false);
HubConnectionReceiveBenchmark.cs (4)
47var handshakeResponseResult = new ReadResult(new ReadOnlySequence<byte>(writer.ToArray()), false, false); 126_nextReadTcs.SetResult(new ReadResult(default, false, true)); 137_pipe.AddReadResult(new ValueTask<ReadResult>(new ReadResult(new ReadOnlySequence<byte>(_invocationMessageBytes), false, false))); 154_tcs.SetResult(new ReadResult(new ReadOnlySequence<byte>(_invocationMessageBytes), false, false));
HubConnectionSendBenchmark.cs (2)
32var handshakeResponseResult = new ReadResult(new ReadOnlySequence<byte>(writer.ToArray()), false, false); 86_tcs.SetResult(new ReadResult(default, false, true));
HubConnectionStartBenchmark.cs (1)
31_handshakeResponseResult = new ReadResult(new ReadOnlySequence<byte>(writer.ToArray()), false, false);
Shared\TestPipeReader.cs (1)
39return new ValueTask<ReadResult>(new ReadResult(default, false, true));
System.IO.Pipelines (7)
System\IO\Pipelines\Pipe.cs (2)
974result = new ReadResult(readOnlySequence, isCanceled, isCompleted); 978result = new ReadResult(default, isCanceled, isCompleted);
System\IO\Pipelines\SequencePipeReader.cs (2)
69result = new ReadResult(ReadOnlySequence<byte>.Empty, isCanceled: false, isCompleted: true); 81result = new ReadResult(_sequence, isCancellationRequested, isCompleted: true);
System\IO\Pipelines\StreamPipeReader.cs (3)
236ReadResult completedResult = new ReadResult(buffer: default, isCanceled: false, isCompleted: true); 305return new ReadResult(reader.GetCurrentReadOnlySequence(), isCanceled, reader._isStreamCompleted); 477result = new ReadResult(buffer, isCancellationRequested, _isStreamCompleted);