225 references to AsMemory
Aspire.Dashboard (1)
dotnet (5)
ILCompiler.Compiler (3)
ILCompiler.ReadyToRun (1)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (5)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Http (3)
Microsoft.AspNetCore.Http.Connections (4)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.Http.Extensions (3)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.OpenApi (3)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.RequestDecompression (1)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.ResponseCompression (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (3)
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Watch.BrowserRefresh (3)
Microsoft.AspNetCore.WebUtilities (17)
Microsoft.Build (4)
Microsoft.Build.Tasks.Core (2)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Http.Diagnostics (3)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (12)
Resolver\LoopbackDnsServer.cs (9)
60int bytesWritten = await ProcessRequestCore((IPEndPoint)result.RemoteEndPoint, new ArraySegment<byte>(buffer, 0, result.ReceivedBytes), action, buffer.AsMemory(0, 512));
62await _dnsSocket.SendToAsync(buffer.AsMemory(0, bytesWritten), SocketFlags.None, result.RemoteEndPoint);
94int read = await tcpClient.ReceiveAsync(buffer.AsMemory(bytesRead, toRead), SocketFlags.None);
105await tcpClient.SendAsync(buffer.AsMemory(0, bytesWritten + 2), SocketFlags.None);
169!DnsPrimitives.TryReadQName(buffer.AsMemory(0, length), 0, out EncodedDomainName encodedName, out _))
212int bytesWritten = Write(buffer.AsMemory(0, 512));
249records.Add(new DnsResourceRecord(EncodeDomainName(name), QueryType.CNAME, QueryClass.Internet, ttl, buff.AsMemory(0, length)));
268records.Add(new DnsResourceRecord(EncodeDomainName(name), QueryType.SRV, QueryClass.Internet, ttl, buff.AsMemory(0, length)));
290records.Add(new DnsResourceRecord(EncodeDomainName(name), QueryType.SOA, QueryClass.Internet, ttl, buff.AsMemory(0, length)));
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (2)
Microsoft.ML.Tokenizers (4)
Model\TiktokenTokenizer.cs (4)
331(int Id, int TokenIndex, int TokenLength)[] encodedTokens = BytePairEncoder.BytePairEncode(arrayPoolArray.AsMemory(0, encodedLength), _encoder, indexMappingSpan.Slice(0, encodedLength + 1));
448(int Id, int TokenIndex, int TokenLength)[] encodedTokens = BytePairEncoder.BytePairEncode(arrayPoolArray.AsMemory(0, encodedLength), _encoder, indexMappingSpan.Slice(0, encodedLength + 1));
613(int Id, int TokenIndex, int TokenLength)[] encodedTokens = BytePairEncoder.BytePairEncode(arrayPoolArray.AsMemory(0, encodedLength), _encoder, indexMappingSpan.Slice(0, encodedLength + 1));
739(int Id, int TokenIndex, int TokenLength)[] encodedTokens = BytePairEncoder.BytePairEncode(arrayPoolArray.AsMemory(0, encodedLength), _encoder, indexMappingSpan.Slice(0, encodedLength + 1));
Shared (1)
System.Formats.Tar (12)
System.IO.Compression (21)
System\IO\Compression\ZipArchiveEntry.Async.cs (5)
992await _archive.ArchiveStream.WriteAsync(writeBuffer.AsMemory(0, MetadataBufferLength), cancellationToken).ConfigureAwait(false);
998await _archive.ArchiveStream.WriteAsync(writeBuffer.AsMemory(0, CrcAndSizesBufferLength), cancellationToken).ConfigureAwait(false);
1009await _archive.ArchiveStream.WriteAsync(writeBuffer.AsMemory(0, Zip64SizesBufferLength), cancellationToken).ConfigureAwait(false);
1021await _archive.ArchiveStream.WriteAsync(writeBuffer.AsMemory(0, Zip64DataDescriptorCrcAndSizesBufferLength), cancellationToken).ConfigureAwait(false);
1030return _archive.ArchiveStream.WriteAsync(dataDescriptor.AsMemory(0, bytesToWrite), cancellationToken);
System.Memory (1)
System.Memory.Data (1)
System.Net.Http (11)
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (9)
90await WriteAsync(stream, buffer.AsMemory(0, buffer[1] + 2), async).ConfigureAwait(false);
97await ReadToFillAsync(stream, buffer.AsMemory(0, 2), async).ConfigureAwait(false);
127await WriteAsync(stream, buffer.AsMemory(0, 3 + usernameLength + passwordLength), async).ConfigureAwait(false);
134await ReadToFillAsync(stream, buffer.AsMemory(0, 2), async).ConfigureAwait(false);
185await WriteAsync(stream, buffer.AsMemory(0, addressLength + 6), async).ConfigureAwait(false);
192await ReadToFillAsync(stream, buffer.AsMemory(0, 5), async).ConfigureAwait(false);
205await ReadToFillAsync(stream, buffer.AsMemory(0, bytesToSkip), async).ConfigureAwait(false);
295await WriteAsync(stream, buffer.AsMemory(0, totalLength), async).ConfigureAwait(false);
301await ReadToFillAsync(stream, buffer.AsMemory(0, 8), async).ConfigureAwait(false);
System.Net.Http.WinHttpHandler (1)
System.Net.HttpListener (1)
System.Net.Mail (10)
System.Net.NameResolution (4)
System\Net\DnsResolverPal.Managed.cs (4)
402ReadOnlyMemory<byte> query = queryBytes.AsMemory(0, queryLength);
705await SendExactAsync(socket, buffer.AsMemory(0, 2), timeoutCts.Token).ConfigureAwait(false);
708await ReceiveExactAsync(socket, buffer.AsMemory(0, 2), timeoutCts.Token).ConfigureAwait(false);
717await ReceiveExactAsync(socket, buffer.AsMemory(0, responseLength), timeoutCts.Token).ConfigureAwait(false);
System.Net.Quic (2)
System.Net.Requests (1)
System.Net.Security (2)
System.Net.Sockets (4)
System.Net.WebSockets (2)
System.Private.CoreLib (2)
System.Private.Xml (5)
System.Security.Cryptography (9)
System\Security\Cryptography\CryptoStream.cs (6)
220return ReadAsyncInternal(buffer.AsMemory(offset, count), cancellationToken).AsTask();
295ValueTask<int> completedValueTask = ReadAsyncCore(buffer.AsMemory(offset, count), default(CancellationToken), useAsync: false);
459return WriteAsyncInternal(buffer.AsMemory(offset, count), cancellationToken).AsTask();
499WriteAsyncCore(buffer.AsMemory(offset, count), default, useAsync: false).AsTask().GetAwaiter().GetResult();
730bytesRead = await ReadAsync(rentedBuffer.AsMemory(0, bufferSize), cancellationToken).ConfigureAwait(false);
731await destination.WriteAsync(rentedBuffer.AsMemory(0, bytesRead), cancellationToken).ConfigureAwait(false);
System.Security.Cryptography.Cose (3)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
408await WriteSignatureAsync(writer, signer, buffer, buffer.AsMemory(0, protectedMapBytesWritten), associatedData, content, cancellationToken).ConfigureAwait(false);
487await AppendToBeSignedAsync(buffer, toBeSignedBuilder, SigStructureContext.Signature, bodyProtected, buffer.AsMemory(start, signProtectedBytesWritten), associatedData, contentStream, cancellationToken).ConfigureAwait(false);
System.Security.Cryptography.Pkcs (1)
System.Text.Json (6)
System\Text\Json\Document\JsonDocument.Parse.cs (4)
93utf8Bytes.AsMemory(0, length),
294utf8Bytes.AsMemory(0, actualByteCount),
661document = Parse(rented.AsMemory(0, length), state.Options, rented, allowDuplicateProperties: allowDuplicateProperties);
909lastRead = await stream.ReadAsync(rented.AsMemory(written, utf8BomLength - written), cancellationToken).ConfigureAwait(false);
System.Windows.Extensions (2)