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