469 instantiations of ArraySegment
AutobahnTestApp (3)
ClientSample (1)
dotnet-dev-certs (1)
dotnet-getdocument (1)
dotnet-openapi (1)
dotnet-sql-cache (1)
dotnet-svcutil-lib (27)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (10)
581new ArraySegment<byte>(internalBuffer, receivedByteCount, internalBuffer.Length - receivedByteCount),
767result = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, 0, _receiveBufferSize), cancelToken);
838new ArraySegment<byte>(buffer, 0, count),
849ArraySegment<byte> bytes = new ArraySegment<byte>(buffer, 0, count);
1060result = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, offset, count), cancellationToken);
1140await _webSocket.SendAsync(new ArraySegment<byte>(buffer, offset, count), _outgoingMessageType, false, cancellationToken);
1183Task task = _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, timeoutHelper.GetCancellationToken());
1209await _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, cancelToken);
1251_initialReadBuffer = new ArraySegment<byte>(_initialReadBuffer.Array, _initialReadBuffer.Offset + bytesToCopy, _initialReadBuffer.Count - bytesToCopy);
1272_webSocket.ReceiveAsync(new ArraySegment<byte>(_initialReadBuffer.Array), cancelToken);
dotnet-user-jwts (1)
dotnet-user-secrets (1)
ExceptionHandlerSample (1)
Extensibility.MessageEncoder.IntegrationTests (1)
GenerateDocumentationAndConfigFiles (4)
GetDocument.Insider (1)
IIS.FunctionalTests (2)
IISExpress.FunctionalTests (2)
InMemory.FunctionalTests (2)
InProcessWebSite (5)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (5)
138await webSocket.SendAsync(new ArraySegment<byte>(Encoding.ASCII.GetBytes(message)), WebSocketMessageType.Text, true, CancellationToken.None);
166var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), token);
181await webSocket.SendAsync(new ArraySegment<byte>(buffer, 0, result.Count), result.MessageType, result.EndOfMessage, token);
182result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), token);
215result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
Metrics (4)
Metrics.Legacy (4)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.Web.Tests (1)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.DataProtection (22)
Microsoft.AspNetCore.DataProtection.Tests (90)
Cng\CbcAuthenticatedEncryptorTests.cs (12)
24ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
25ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
29byte[] decipheredtext = encryptor.Decrypt(new ArraySegment<byte>(ciphertext), aad);
45ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
46ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
54encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooShort), aad);
63encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_manipulated), aad);
71encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooLong), aad);
78encryptor.Decrypt(new ArraySegment<byte>(validCiphertext), new ArraySegment<byte>(Encoding.UTF8.GetBytes("different aad")));
93ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
94ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
Cng\CngAuthenticatedEncryptorBaseTests.cs (6)
14var ciphertext = new ArraySegment<byte>(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04 }, 3, 2);
15var aad = new ArraySegment<byte>(new byte[] { 0x10, 0x11, 0x12, 0x13, 0x14 }, 1, 4);
39var ciphertext = new ArraySegment<byte>(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04 }, 3, 2);
40var aad = new ArraySegment<byte>(new byte[0]);
64var ciphertext = new ArraySegment<byte>(new byte[0]);
65var aad = new ArraySegment<byte>(new byte[] { 0x10, 0x11, 0x12, 0x13, 0x14 }, 1, 4);
Cng\GcmAuthenticatedEncryptorTests.cs (12)
21ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
22ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
26byte[] decipheredtext = encryptor.Decrypt(new ArraySegment<byte>(ciphertext), aad);
39ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
40ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
48encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooShort), aad);
57encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_manipulated), aad);
65encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooLong), aad);
72encryptor.Decrypt(new ArraySegment<byte>(validCiphertext), new ArraySegment<byte>(Encoding.UTF8.GetBytes("different aad")));
83ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
84ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
Managed\ManagedAuthenticatedEncryptorTests.cs (12)
20ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
21ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
25byte[] decipheredtext = encryptor.Decrypt(new ArraySegment<byte>(ciphertext), aad);
40ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
41ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
49encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooShort), aad);
58encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_manipulated), aad);
66encryptor.Decrypt(new ArraySegment<byte>(invalidCiphertext_tooLong), aad);
73encryptor.Decrypt(new ArraySegment<byte>(validCiphertext), new ArraySegment<byte>(Encoding.UTF8.GetBytes("different aad")));
87ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
88ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
SecretTests.cs (8)
24var input = new ArraySegment<byte>(new byte[] { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 }, 1, 3);
34var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
61var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
82secret.WriteSecretIntoBuffer(new ArraySegment<byte>(new byte[0]));
121secret.WriteSecretIntoBuffer(new ArraySegment<byte>(new byte[0]));
143var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
205testCode: () => secret.WriteSecretIntoBuffer(new ArraySegment<byte>(new byte[100])),
219testCode: () => secret.WriteSecretIntoBuffer(new ArraySegment<byte>(new byte[16])));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.Server.HttpSys (8)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (26)
Http1\Http1ConnectionTests.cs (15)
300await _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]));
311await _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]));
321await _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]));
591await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1])));
602await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]), default(CancellationToken)));
613await _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]));
624await _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]), default(CancellationToken));
679await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)ch }));
683await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)'d' }));
701await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)ch }), default(CancellationToken));
705await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)'d' }), default(CancellationToken));
756await _http1Connection.WriteAsyncAwaited(startingTask, new ArraySegment<byte>(new[] { (byte)'h' }), default(CancellationToken));
761await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)ch }), default(CancellationToken));
765await _http1Connection.WriteAsync(new ArraySegment<byte>(new[] { (byte)'d' }), default(CancellationToken));
780await _http1Connection.WriteAsync(new ArraySegment<byte>(Encoding.ASCII.GetBytes("hello, world")), default(CancellationToken));
MessageBodyTests.cs (10)
46AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
172AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
199AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
320AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
432AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
459AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, count));
536AssertASCII(largeInput + "Hello", new ArraySegment<byte>(requestArray, 0, requestArray.Length));
608Assert.Equal(0, await stream.ReadAsync(new ArraySegment<byte>(new byte[1])));
667AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, 5));
694AssertASCII("Hello", new ArraySegment<byte>(buffer, 0, 5));
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SignalR.Tests (4)
Microsoft.AspNetCore.SpaServices.Extensions (3)
Microsoft.AspNetCore.TestHost (4)
Microsoft.AspNetCore.TestHost.Tests (15)
TestClientTests.cs (15)
587var receiveResult = await websocket.ReceiveAsync(new System.ArraySegment<byte>(receiveArray), CancellationToken.None);
595var sendBuffer = new System.ArraySegment<byte>(receiveArray, 0, receiveResult.Count);
617await clientSocket.SendAsync(new System.ArraySegment<byte>(hello), WebSocketMessageType.Text, true, CancellationToken.None);
619await clientSocket.SendAsync(new System.ArraySegment<byte>(world), WebSocketMessageType.Binary, true, CancellationToken.None);
626var result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None);
631result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None);
636result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None);
684var result = await clientSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
709var receiveResult = await websocket.ReceiveAsync(new ArraySegment<byte>(receiveArray), CancellationToken.None);
717var sendBuffer = new System.ArraySegment<byte>(receiveArray, 0, receiveResult.Count);
776await Assert.ThrowsAsync<IOException>(async () => await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None));
793var receiveResult = await websocket.ReceiveAsync(new System.ArraySegment<byte>(receiveArray), CancellationToken.None);
794var sendBuffer = new System.ArraySegment<byte>(receiveArray, 0, receiveResult.Count);
809await clientSocket.SendAsync(new System.ArraySegment<byte>(hello), WebSocketMessageType.Text, true, CancellationToken.None);
816var result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None);
Microsoft.AspNetCore.WebSockets.Tests (50)
SendReceiveTests.cs (11)
19await pair.ClientSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Text, endOfMessage: true, cancellationToken: CancellationToken.None);
22var result = await pair.ServerSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
36await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Text, endOfMessage: true, cancellationToken: CancellationToken.None);
39var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
51await pair.ClientSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None);
54var result = await pair.ServerSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
66await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None);
69var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
81await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None);
84var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
94await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
WebSocketMiddlewareTests.cs (35)
71var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
81await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
96var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
106await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
121var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
131await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
147var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
159await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
178var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
186new ArraySegment<byte>(serverBuffer, totalReceived, serverBuffer.Length - totalReceived), CancellationToken.None);
194new ArraySegment<byte>(serverBuffer, totalReceived, serverBuffer.Length - totalReceived), CancellationToken.None);
206await client.SendAsync(new ArraySegment<byte>(originalData, 0, 2), WebSocketMessageType.Binary, false, CancellationToken.None);
209await client.SendAsync(new ArraySegment<byte>(originalData, 2, 2), WebSocketMessageType.Binary, false, CancellationToken.None);
212await client.SendAsync(new ArraySegment<byte>(originalData, 4, 7), WebSocketMessageType.Binary, true, CancellationToken.None);
226await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
233var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None);
251await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
258var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None);
276await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None);
287result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer, receivedCount, clientBuffer.Length - receivedCount), CancellationToken.None);
309await webSocket.SendAsync(new ArraySegment<byte>(originalData, 0, 2), WebSocketMessageType.Binary, false, CancellationToken.None);
310await webSocket.SendAsync(new ArraySegment<byte>(originalData, 2, 2), WebSocketMessageType.Binary, false, CancellationToken.None);
311await webSocket.SendAsync(new ArraySegment<byte>(originalData, 4, 7), WebSocketMessageType.Binary, true, CancellationToken.None);
318var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None);
325new ArraySegment<byte>(clientBuffer, totalReceived, clientBuffer.Length - totalReceived), CancellationToken.None);
332new ArraySegment<byte>(clientBuffer, totalReceived, clientBuffer.Length - totalReceived), CancellationToken.None);
353var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
387var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None);
409var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
439var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
473var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None);
485var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None);
526var pendingResponse = serverSocket.ReceiveAsync(new ArraySegment<byte>(new byte[1024]), default);
532var response = await serverSocket.ReceiveAsync(new ArraySegment<byte>(new byte[1024]), default);
601var response = await serverSocket.ReceiveAsync(new ArraySegment<byte>(new byte[1024]), cts.Token);
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.CodeAnalysis (9)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
Microsoft.CodeAnalysis.CodeStyle (4)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.UnitTests (6)
EmbeddedTextTests.cs (6)
28Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromBytes("path", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.None));
81var text = EmbeddedText.FromBytes("pathToEmpty", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.Sha1);
118var text = EmbeddedText.FromBytes("pathToSmall", new ArraySegment<byte>(bytes, 0, bytes.Length));
133var text = EmbeddedText.FromBytes("pathToSmall", new ArraySegment<byte>(paddedBytes, 1, bytes.Length));
160var text = EmbeddedText.FromBytes("pathToLarge", new ArraySegment<byte>(bytes, 0, bytes.Length), SourceHashAlgorithms.Default);
175var text = EmbeddedText.FromBytes("pathToLarge", new ArraySegment<byte>(paddedBytes, 1, bytes.Length), SourceHashAlgorithms.Default);
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.Data.Analysis (1)
Microsoft.DotNet.Build.Tasks.Installers (2)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.Hybrid.Tests (10)
PayloadTests.cs (10)
56var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
85var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
91result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out payload, out remaining, out flags, out entropy, out pendingTags, out _);
121var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
151var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
157result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out payload, out remaining, out flags, out entropy, out pendingTags, out _);
189var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
211var result = HybridCachePayload.TryParse(new(bytes), "whatever", TagSet.Empty, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
238var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength - 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
265var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength + 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
Microsoft.Extensions.Caching.SqlServer (5)
Microsoft.Extensions.DependencyModel (1)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (3)
21var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
38var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
58var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (3)
Resolver\LoopbackDnsServer.cs (2)
60int bytesWritten = await ProcessRequestCore((IPEndPoint)result.RemoteEndPoint, new ArraySegment<byte>(buffer, 0, result.ReceivedBytes), action, buffer.AsMemory(0, 512));
103int bytesWritten = await ProcessRequestCore((IPEndPoint)tcpClient.RemoteEndPoint!, new ArraySegment<byte>(buffer, 2, length), action, buffer.AsMemory(2));
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Telemetry.Abstractions (3)
Microsoft.Extensions.Telemetry.Abstractions.Tests (6)
Microsoft.Extensions.Telemetry.Tests (9)
PresentationCore (1)
Roslyn.Diagnostics.Analyzers (4)
Swaggatherer (1)
System.Formats.Nrbf (1)
System.Memory (1)
System.Private.CoreLib (11)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (2)
150return ReadSpan(new Span<byte>(buffer, offset, count), new ArraySegment<byte>(buffer, offset, count));
468WriteSpan(new ReadOnlySpan<byte>(buffer, offset, count), new ArraySegment<byte>(buffer, offset, count));
System.Private.DataContractSerialization (5)
System.Private.Windows.Core (9)
System\Value.cs (8)
783? new(byteArray, _union.Segment.Offset, _union.Segment.Count)
784: new(byteArray, 0, 0);
799? new(charArray, _union.Segment.Offset, _union.Segment.Count)
800: new(charArray, 0, 0);
1004? (T)(object)new ArraySegment<char>(chars, _union.Segment.Offset, _union.Segment.Count)
1005: (T)(object)new ArraySegment<char>(chars, 0, 0);
1011? (T)(object)new ArraySegment<byte>(bytes, _union.Segment.Offset, _union.Segment.Count)
1012: (T)(object)new ArraySegment<byte>(bytes, 0, 0);
System.Private.Windows.Core.Tests (6)
System.Reflection.Metadata (1)
System.Security.Cryptography.Pkcs (2)
System.ServiceModel.NetFramingBase (3)
System.Text.Json (3)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
Test.Utilities (4)
Text.Analyzers (4)
Wasm.Performance.ConsoleHost (1)
WebSocketSample (2)
720 references to ArraySegment
ClientSample (6)
dotnet-svcutil-lib (69)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (8)
257ArraySegment<byte> buffer = this.Buffer;
381private ArraySegment<byte> AddSessionInformationToMessage(ArraySegment<byte> messageData, BufferManager bufferManager, int maxMessageSize)
437private ArraySegment<byte> ExtractSessionInformationFromMessage(ArraySegment<byte> messageData)
516public override Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType)
619public override ArraySegment<byte> WriteMessage(Message message, int maxMessageSize, BufferManager bufferManager, int messageOffset)
682ArraySegment<byte> messageData = messageWriter.WriteMessage(message, bufferManager, messageOffset, maxMessageSize);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (8)
79ArraySegment<byte> messageData;
99protected override AsyncCompletionResult StartWritingBufferedMessage(Message message, ArraySegment<byte> messageData, bool allowOutputBatching, TimeSpan timeout, Action<object> callback, object state)
111protected override ArraySegment<byte> EncodeMessage(Message message)
113ArraySegment<byte> messageData = MessageEncoder.WriteMessage(message,
194private ArraySegment<byte> CreatePreamble()
241private async Task<IConnection> SendPreambleAsync(IConnection connection, ArraySegment<byte> preamble, TimeSpan timeout)
282private IConnection SendPreamble(IConnection connection, ArraySegment<byte> preamble, ref TimeoutHelper timeoutHelper)
415private ArraySegment<byte> _preamble;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoder.cs (8)
42public virtual Task<Message> ReadMessageAsync(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType)
49public Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager)
55public abstract Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType);
58internal async Task<ArraySegment<byte>> BufferMessageStreamAsync(Stream stream, BufferManager bufferManager, int maxBufferSize)
115public ArraySegment<byte> WriteMessage(Message message, int maxMessageSize, BufferManager bufferManager)
117ArraySegment<byte> arraySegment = WriteMessage(message, maxMessageSize, bufferManager, 0);
121public abstract ArraySegment<byte> WriteMessage(Message message, int maxMessageSize,
130public virtual Task<ArraySegment<byte>> WriteMessageAsync(Message message, int maxMessageSize,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (5)
401public override Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType)
461public override ArraySegment<byte> WriteMessage(Message message, int maxMessageSize, BufferManager bufferManager, int messageOffset)
471public override Task<ArraySegment<byte>> WriteMessageAsync(Message message, int maxMessageSize, BufferManager bufferManager, int messageOffset)
496ArraySegment<byte> messageData = messageWriter.WriteMessage(message, bufferManager, messageOffset, maxMessageSize);
716ArraySegment<byte> buffer = this.Buffer;
Extensibility.MessageEncoder.IntegrationTests (5)
GenerateDocumentationAndConfigFiles (6)
http2cat (3)
IIS.FunctionalTests (3)
IIS.LongTests (3)
IIS.NewHandler.FunctionalTests (3)
IIS.NewShim.FunctionalTests (3)
IIS.ShadowCopy.Tests (3)
IISExpress.FunctionalTests (3)
Interop.FunctionalTests (1)
KeyManagementSimulator (4)
Metrics (6)
Metrics.Legacy (6)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (4)
Microsoft.AspNetCore.Components.WebView (4)
Microsoft.AspNetCore.Components.WebView.Test (6)
Infrastructure\TestDocument.cs (3)
198private int InsertFrame(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, RenderTreeFrame frame, int frameIndex)
270private int InsertFrameRange(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, int startIndex, int endIndexExcl)
286private void InsertElement(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, RenderTreeFrame frame, int frameIndex)
Microsoft.AspNetCore.DataProtection (38)
Microsoft.AspNetCore.DataProtection.Tests (56)
Cng\CbcAuthenticatedEncryptorTests.cs (6)
24ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
25ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
45ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
46ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
93ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
94ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
Cng\CngAuthenticatedEncryptorBaseTests.cs (6)
14var ciphertext = new ArraySegment<byte>(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04 }, 3, 2);
15var aad = new ArraySegment<byte>(new byte[] { 0x10, 0x11, 0x12, 0x13, 0x14 }, 1, 4);
39var ciphertext = new ArraySegment<byte>(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04 }, 3, 2);
40var aad = new ArraySegment<byte>(new byte[0]);
64var ciphertext = new ArraySegment<byte>(new byte[0]);
65var aad = new ArraySegment<byte>(new byte[] { 0x10, 0x11, 0x12, 0x13, 0x14 }, 1, 4);
Cng\GcmAuthenticatedEncryptorTests.cs (6)
21ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
22ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
39ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
40ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
83ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
84ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
KeyManagement\KeyRingBasedDataProtectorTests.cs (24)
46.Setup(o => o.Encrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
47.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualPlaintext, actualAad) =>
84.Setup(o => o.Encrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
85.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualPlaintext, actualAad) =>
424.Setup(o => o.Decrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
425.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualCiphertext, actualAad) =>
471.Setup(o => o.Decrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
472.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualCiphertext, actualAad) =>
520.Setup(o => o.Decrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
521.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualCiphertext, actualAad) =>
595.Setup(o => o.Encrypt(It.IsAny<ArraySegment<byte>>(), It.IsAny<ArraySegment<byte>>()))
596.Returns<ArraySegment<byte>, ArraySegment<byte>>((actualPlaintext, actualAad) =>
Managed\ManagedAuthenticatedEncryptorTests.cs (6)
20ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
21ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
40ArraySegment<byte> plaintext = new ArraySegment<byte>(Encoding.UTF8.GetBytes("plaintext"));
41ArraySegment<byte> aad = new ArraySegment<byte>(Encoding.UTF8.GetBytes("aad"));
87ArraySegment<byte> plaintext = new ArraySegment<byte>(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, 2, 3);
88ArraySegment<byte> aad = new ArraySegment<byte>(new byte[] { 7, 6, 5, 4, 3, 2, 1, 0 }, 1, 4);
SecretTests.cs (5)
15testCode: () => new Secret(default(ArraySegment<byte>)),
24var input = new ArraySegment<byte>(new byte[] { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 }, 1, 3);
34var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
61var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
143var outputSegment = new ArraySegment<byte>(new byte[7], 2, 3);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Owin (9)
Microsoft.AspNetCore.Server.HttpSys (14)
RequestProcessing\ResponseBody.cs (7)
112private unsafe void FlushInternal(bool endOfRequest, ArraySegment<byte> data = new ArraySegment<byte>())
190private unsafe void BuildDataChunks(scoped ref UnmanagedBufferAllocator allocator, bool endOfRequest, ArraySegment<byte> data, out Span<HTTP_DATA_CHUNK> dataChunks, out Span<GCHandle> pins)
244var chunkHeaderBuffer = Helpers.GetChunkHeader(data.Count);
278ArraySegment<byte> buffer,
320private unsafe Task FlushInternalAsync(ArraySegment<byte> data, CancellationToken cancellationToken)
539var data = new ArraySegment<byte>(buffer, offset, count);
591var data = new ArraySegment<byte>(buffer, offset, count);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.Server.IIS (4)
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (5)
Microsoft.AspNetCore.Shared.Tests (3)
Microsoft.AspNetCore.SignalR.Client.Tests (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (2)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.TestHost (5)
Microsoft.AspNetCore.TestHost.Tests (3)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.WebSockets.Tests (1)
Microsoft.AspNetCore.WebUtilities (4)
Microsoft.Build.Framework (3)
Microsoft.CodeAnalysis (18)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.Collections.Package (3)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.Extensions.Package (3)
Microsoft.CodeAnalysis.Features (4)
Microsoft.CodeAnalysis.InteractiveHost (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
Microsoft.CodeAnalysis.Threading.Package (3)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces (6)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Microsoft.Data.Analysis (2)
Microsoft.DotNet.Build.Tasks.Installers (6)
Microsoft.DotNet.SignTool (1)
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Caching.Hybrid (5)
Microsoft.Extensions.Caching.Hybrid.Tests (10)
PayloadTests.cs (8)
56var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
85var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
121var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
151var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
189var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
211var result = HybridCachePayload.TryParse(new(bytes), "whatever", TagSet.Empty, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
238var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength - 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
265var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength + 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
Microsoft.Extensions.Caching.SqlServer (8)
Microsoft.Extensions.DependencyModel (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Latency\Internal\HttpClientLatencyLogEnricherTest.cs (3)
21var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
38var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
58var checkpoints = new ArraySegment<Checkpoint>(new[] { new Checkpoint("a", default, default), new Checkpoint("b", default, default) });
Microsoft.Extensions.Logging.AzureAppServices (3)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.ServiceDiscovery.Dns (9)
Resolver\DnsResolver.cs (5)
303static bool TryReadTarget(in DnsResourceRecord record, ArraySegment<byte> messageBytes, out EncodedDomainName target)
313var gotArray = MemoryMarshal.TryGetArray(record.Data, out ArraySegment<byte> segment);
538Response = new DnsResponse(ArraySegment<byte>.Empty, header, queryStartedTime, queryStartedTime, null!, null!, null!),
551Response = new DnsResponse(ArraySegment<byte>.Empty, header, queryStartedTime, queryStartedTime, null!, null!, null!),
565Response = new DnsResponse(ArraySegment<byte>.Empty, header, queryStartedTime, queryStartedTime, null!, null!, null!),
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Telemetry.Abstractions (9)
Microsoft.Extensions.Telemetry.Abstractions.Tests (6)
Microsoft.Extensions.Telemetry.Tests (10)
Microsoft.ML.Core (1)
Microsoft.ML.Data (6)
mscorlib (1)
netstandard (1)
Roslyn.Diagnostics.Analyzers (6)
Roslyn.Test.PdbUtilities (2)
System.Formats.Asn1 (1)
System.Formats.Nrbf (2)
System.Memory (3)
System.Net.HttpListener (4)
System.Net.Sockets (32)
artifacts\obj\System.Net.Sockets\Debug\net10.0\System.Net.Sockets.notsupported.cs (32)
319public System.IAsyncResult BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
320public System.IAsyncResult? BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
325public System.IAsyncResult BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
326public System.IAsyncResult? BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
384public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
385public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
386public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
390public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
391public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
392public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
393public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
404public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
405public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
412public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
413public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
424public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
425public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
426public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
430public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
431public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
432public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
433public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
450public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEP) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
451public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
471public System.Collections.Generic.IList<System.ArraySegment<byte>>? BufferList { get { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); } }
642public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
644public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
648public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
650public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
652public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
654public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
658public static System.Threading.Tasks.Task<int> SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw new System.PlatformNotSupportedException(System.SR.SystemNetSockets_PlatformNotSupported); }
System.Net.WebSockets (5)
artifacts\obj\System.Net.WebSockets\Debug\net10.0\System.Net.WebSockets.notsupported.cs (5)
28public static System.ArraySegment<byte> CreateClientBuffer(int receiveBufferSize, int sendBufferSize) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WebSockets); }
30public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string? subProtocol, int receiveBufferSize, int sendBufferSize, System.TimeSpan keepAliveInterval, bool useZeroMaskingKey, System.ArraySegment<byte> internalBuffer) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WebSockets); }
33public static System.ArraySegment<byte> CreateServerBuffer(int receiveBufferSize) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WebSockets); }
39public abstract System.Threading.Tasks.Task<System.Net.WebSockets.WebSocketReceiveResult> ReceiveAsync(System.ArraySegment<byte> buffer, System.Threading.CancellationToken cancellationToken);
44public abstract System.Threading.Tasks.Task SendAsync(System.ArraySegment<byte> buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken);
System.Net.WebSockets.Client (6)
System.Private.CoreLib (52)
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (8)
3722public static Span<T> AsSpan<T>(this ArraySegment<T> segment)
3739public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start)
3754public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Index startIndex)
3773public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start, int length)
3789public static Span<T> AsSpan<T>(this ArraySegment<T> segment, Range range)
3868public static Memory<T> AsMemory<T>(this ArraySegment<T> segment) => new Memory<T>(segment.Array, segment.Offset, segment.Count);
3881public static Memory<T> AsMemory<T>(this ArraySegment<T> segment, int start)
3901public static Memory<T> AsMemory<T>(this ArraySegment<T> segment, int start, int length)
System.Private.DataContractSerialization (10)
System.Private.Windows.Core (21)
System.Private.Windows.Core.Tests (22)
System\Value\StoringArrays.cs (22)
19Assert.Throws<InvalidCastException>(() => value.GetValue<ArraySegment<byte>>());
33Assert.Throws<InvalidCastException>(() => value.GetValue<ArraySegment<char>>());
42ArraySegment<byte> segment = new(b);
44Assert.Equal(typeof(ArraySegment<byte>), value.Type);
45Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
46Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
51Assert.Equal(typeof(ArraySegment<byte>), value.Type);
52Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
53Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
58Assert.Equal(typeof(ArraySegment<byte>), value.Type);
59Assert.Equal(segment, value.GetValue<ArraySegment<byte>>());
60Assert.Equal(segment, (ArraySegment<byte>)value.GetValue<object>());
70ArraySegment<char> segment = new(b);
72Assert.Equal(typeof(ArraySegment<char>), value.Type);
73Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
74Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
79Assert.Equal(typeof(ArraySegment<char>), value.Type);
80Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
81Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
86Assert.Equal(typeof(ArraySegment<char>), value.Type);
87Assert.Equal(segment, value.GetValue<ArraySegment<char>>());
88Assert.Equal(segment, (ArraySegment<char>)value.GetValue<object>());
System.Private.Xml (1)
System.Reflection.Metadata (2)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (6)
System.Security.Cryptography.Pkcs (11)
System.ServiceModel.NetFramingBase (13)
System.ServiceModel.Primitives (4)
System.Text.Json (10)
System.Windows.Forms (1)
Test.Utilities (6)
Text.Analyzers (6)