36 references to AsBytes
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitId.cs (2)
42MemoryMarshal.AsBytes(Secret.AsSpan()), 43MemoryMarshal.AsBytes(other.Secret.AsSpan()));
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\HttpHeaders.cs (2)
381var byteValue = MemoryMarshal.AsBytes(value); 568var byteValue = MemoryMarshal.AsBytes(values);
Microsoft.CodeAnalysis.Workspaces (6)
Workspace\Solution\Checksum_Factory.cs (6)
37pooledHash.Object.Append(MemoryMarshal.AsBytes(value.AsSpan())); 38pooledHash.Object.Append(MemoryMarshal.AsBytes("\0".AsSpan())); 52pooledHash.Object.Append(MemoryMarshal.AsBytes(value.AsSpan())); 53pooledHash.Object.Append(MemoryMarshal.AsBytes("\0".AsSpan())); 64XxHash128.Hash(MemoryMarshal.AsBytes(value.AsSpan()), destination); 113XxHash128.Hash(MemoryMarshal.AsBytes(hashes), destination);
Microsoft.Extensions.Compliance.Redaction (1)
HmacRedactor.cs (1)
84_ = HMACSHA256.HashData(hashKey, MemoryMarshal.AsBytes(source), hashBuffer);
Microsoft.Extensions.FileProviders.Physical (2)
PollingWildCardChangeToken.cs (2)
178sha256.AppendData(MemoryMarshal.AsBytes(path.AsSpan())); 179sha256.AppendData(MemoryMarshal.AsBytes([lastChangedUtc]));
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.RawSocket.cs (2)
113socket.SetRawSocketOption(0, 11, MemoryMarshal.AsBytes(new ReadOnlySpan<int>(in opt))); 118socket.SetRawSocketOption(41, 25, MemoryMarshal.AsBytes(new ReadOnlySpan<int>(in opt)));
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2253ReadOnlySpan<byte> rawData = MemoryMarshal.AsBytes(new ReadOnlySpan<long>(ref value));
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewNumber.cs (1)
214Rune.DecodeLastFromUtf8(MemoryMarshal.AsBytes(outputBuffer.AsSpan()), out Rune value, out int bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\Guid.cs (4)
997Guid guid = new Guid(MemoryMarshal.AsBytes(new ReadOnlySpan<Guid>(in this)), false); 1015Guid guid = new Guid(MemoryMarshal.AsBytes(new ReadOnlySpan<Guid>(in this)), bigEndian); 1034Guid guid = new Guid(MemoryMarshal.AsBytes(new ReadOnlySpan<Guid>(in this)), false); 1056Guid guid = new Guid(MemoryMarshal.AsBytes(new ReadOnlySpan<Guid>(in this)), bigEndian);
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (1)
276MemoryMarshal.AsBytes<char>("00010203040506070809" +
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (1)
162if (MemoryMarshal.AsBytes(source).Overlaps(MemoryMarshal.AsBytes(destination)))
src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (1)
206MemoryMarshal.AsBytes(new ReadOnlySpan<int>(in _leftoverBytes)).Slice(0, _leftoverByteCount);
System.Private.DataContractSerialization (8)
System\Xml\XmlBinaryWriter.cs (8)
862WriteArray(XmlBinaryNodeType.BoolTextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 869WriteArray(XmlBinaryNodeType.Int16TextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 885WriteArray(XmlBinaryNodeType.Int32TextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 901WriteArray(XmlBinaryNodeType.Int64TextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 917WriteArray(XmlBinaryNodeType.FloatTextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 935WriteArray(XmlBinaryNodeType.DoubleTextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 953WriteArray(XmlBinaryNodeType.DecimalTextWithEndElement, items.Length, MemoryMarshal.AsBytes(items)); 987WriteArray(XmlBinaryNodeType.GuidTextWithEndElement, items.Length, MemoryMarshal.AsBytes(items));
System.Reflection.Metadata (3)
System\Reflection\Metadata\BlobBuilder.cs (1)
1003WriteBytesUnchecked(MemoryMarshal.AsBytes(value));
System\Reflection\Metadata\BlobWriter.cs (1)
400WriteBytes(MemoryMarshal.AsBytes(value));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
281return GetOrAddBlob(MemoryMarshal.AsBytes(value.AsSpan()));
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (1)
282ReadOnlySpan<byte> utf16Url = MemoryMarshal.AsBytes(crlUrl.AsSpan());