3 writes to Buffer
Microsoft.AspNetCore.Http.Connections.Tests (3)
TestWebSocketConnectionFeature.cs (3)
167
_internalBuffer.
Buffer
= _internalBuffer.Buffer.AsMemory().Slice(length).ToArray();
203
Buffer
= copy,
222
Buffer
= Array.Empty<byte>(),
18 references to Buffer
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (4)
2407
Assert.Equal(firstMsg, webSocketMessage.
Buffer
);
2437
Assert.Equal(secondMsg, webSocketMessage.
Buffer
);
2481
Assert.Equal(firstMsg, webSocketMessage.
Buffer
);
2512
Assert.Equal(secondMsg, webSocketMessage.
Buffer
);
TestWebSocketConnectionFeature.cs (9)
134
if (_internalBuffer.
Buffer
== null || _internalBuffer.
Buffer
.Length == 0)
152
var length = _internalBuffer.
Buffer
.Length;
153
if (buffer.Count - buffer.Offset < _internalBuffer.
Buffer
.Length)
155
length = Math.Min(buffer.Count - buffer.Offset, _internalBuffer.
Buffer
.Length);
156
Buffer.BlockCopy(_internalBuffer.
Buffer
, 0, buffer.Array, buffer.Offset, length);
160
Buffer.BlockCopy(_internalBuffer.
Buffer
, 0, buffer.Array, buffer.Offset, length);
167
_internalBuffer.Buffer = _internalBuffer.
Buffer
.AsMemory().Slice(length).ToArray();
168
endOfMessage = _internalBuffer.
Buffer
.Length == 0 && endOfMessage;
WebSocketsTests.cs (5)
106
Assert.Equal("Hello", Encoding.UTF8.GetString(clientSummary.Received[0].
Buffer
));
418
Assert.Single(messages.Received[0].
Buffer
);
419
Assert.Equal(1, messages.Received[0].
Buffer
[0]);
423
Assert.Single(messages.Received[1].
Buffer
);
424
Assert.Equal(15, messages.Received[1].
Buffer
[0]);