101 references to WriteUInt16LittleEndian
ILCompiler.Compiler (28)
Compiler\ObjectWriter\CodeView\CodeViewSymbolsBuilder.cs (2)
373BinaryPrimitives.WriteUInt16LittleEndian(lengthBuffer, (ushort)(_bufferWriter.WrittenCount)); 393BinaryPrimitives.WriteUInt16LittleEndian(_bufferWriter.GetSpan(sizeof(ushort)), value);
Compiler\ObjectWriter\CodeView\CodeViewTypesBuilder.cs (2)
417BinaryPrimitives.WriteUInt16LittleEndian(lengthBuffer, (ushort)(length + padding - sizeof(ushort))); 432BinaryPrimitives.WriteUInt16LittleEndian(_bufferWriter.GetSpan(sizeof(ushort)), value);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\ObjectDataBuilder.cs (1)
94BinaryPrimitives.WriteUInt16LittleEndian(_data.AppendSpan(sizeof(ushort)), emit);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\CoffObjectWriter.cs (14)
543BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(2), (ushort)NumberOfSections); 547BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(16), SizeOfOptionalHeader); 548BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(18), (ushort)Characteristics); 557BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(2), 0xFFFF); 558BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(4), 2); 648BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 24), NumberOfRelocations); 649BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 26), NumberOfLineNumbers); 720BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(8), (ushort)Type); 793BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 4), (ushort)SectionIndex); 796BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(sliceIndex), Type); 840BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(4), NumberOfRelocations); 841BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6), NumberOfLineNumbers); 843BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(12), (ushort)Number); 847BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(16), (ushort)(Number >> 16));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (8)
985BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(4), (ushort)buffer.Length); 986BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(6), SegmentHeaderEntrySize); 987BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(8), SegmentHeaderEntryCount); 988BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(10), SectionHeaderEntrySize); 989BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(12), SectionHeaderEntryCount); 990BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(14), StringTableIndex); 1078BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(14), sectionIndex); 1084BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6), sectionIndex);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (1)
1196BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6, 2), Descriptor);
ILCompiler.ReadyToRun (28)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\ObjectDataBuilder.cs (1)
94BinaryPrimitives.WriteUInt16LittleEndian(_data.AppendSpan(sizeof(ushort)), emit);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\CoffObjectWriter.cs (14)
543BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(2), (ushort)NumberOfSections); 547BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(16), SizeOfOptionalHeader); 548BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(18), (ushort)Characteristics); 557BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(2), 0xFFFF); 558BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(4), 2); 648BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 24), NumberOfRelocations); 649BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 26), NumberOfLineNumbers); 720BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(8), (ushort)Type); 793BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(NameSize + 4), (ushort)SectionIndex); 796BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(sliceIndex), Type); 840BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(4), NumberOfRelocations); 841BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6), NumberOfLineNumbers); 843BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(12), (ushort)Number); 847BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(16), (ushort)(Number >> 16));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (8)
985BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(4), (ushort)buffer.Length); 986BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(6), SegmentHeaderEntrySize); 987BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(8), SegmentHeaderEntryCount); 988BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(10), SectionHeaderEntrySize); 989BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(12), SectionHeaderEntryCount); 990BinaryPrimitives.WriteUInt16LittleEndian(tempBuffer.Slice(14), StringTableIndex); 1078BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(14), sectionIndex); 1084BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6), sectionIndex);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (1)
1196BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6, 2), Descriptor);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WebcilEncoder.cs (4)
48BinaryPrimitives.WriteUInt16LittleEndian(headerBuffer.Slice(4, 2), header.VersionMajor); 49BinaryPrimitives.WriteUInt16LittleEndian(headerBuffer.Slice(6, 2), header.VersionMinor); 50BinaryPrimitives.WriteUInt16LittleEndian(headerBuffer.Slice(8, 2), header.CoffSections); 51BinaryPrimitives.WriteUInt16LittleEndian(headerBuffer.Slice(10, 2), header.Reserved0);
ILCompiler.TypeSystem (1)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\ILEmitter.cs (1)
63BinaryPrimitives.WriteUInt16LittleEndian(_instructions.AsSpan(_length, sizeof(ushort)), value);
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Utilities\Checksum.Builder.cs (1)
90BinaryPrimitives.WriteUInt16LittleEndian(buffer, value);
Microsoft.Extensions.Caching.Hybrid (3)
Internal\HybridCachePayload.cs (3)
106BinaryPrimitives.WriteUInt16LittleEndian(destination.AsSpan(0, 2), UInt16SentinelPrefixPair); 107BinaryPrimitives.WriteUInt16LittleEndian(destination.AsSpan(2, 2), (ushort)_entropySource.Next(0, 0x010000)); // Next is exclusive at RHS 140BinaryPrimitives.WriteUInt16LittleEndian(destination.AsSpan(len, 2), UInt16SentinelPrefixPair);
System.IO.Compression (34)
System\IO\Compression\ZipArchiveEntry.Async.cs (1)
923BinaryPrimitives.WriteUInt16LittleEndian(flagBytes, (ushort)savedFlags);
System\IO\Compression\ZipArchiveEntry.cs (16)
866BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.VersionNeededToExtract..], (ushort)_versionToExtract); 867BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.GeneralPurposeBitFlags..], (ushort)_generalPurposeBitFlag); 872BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.CompressionMethod..], compressionMethodToWrite); 880BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.FilenameLength..], (ushort)_storedEntryNameBytes.Length); 881BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.ExtraFieldLength..], extraFieldLength); 882BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.FileCommentLength..], (ushort)_fileComment.Length); 883BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.DiskNumberStart..], 0); 884BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.InternalFileAttributes..], 0); 1736BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.VersionNeededToExtract..], (ushort)_versionToExtract); 1737BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.GeneralPurposeBitFlags..], (ushort)_generalPurposeBitFlag); 1741BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.CompressionMethod..], compressionMethodToWrite); 1747BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.FilenameLength..], (ushort)_storedEntryNameBytes.Length); 1748BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.ExtraFieldLength..], extraFieldLength); 1939BinaryPrimitives.WriteUInt16LittleEndian(flagBytes, (ushort)savedFlags); 2071BinaryPrimitives.WriteUInt16LittleEndian(writeBuffer[relativeVersionToExtractLocation..], (ushort)_versionToExtract); 2072BinaryPrimitives.WriteUInt16LittleEndian(writeBuffer[relativeGeneralPurposeBitFlagsLocation..], (ushort)_generalPurposeBitFlag);
System\IO\Compression\ZipBlocks.cs (15)
40BinaryPrimitives.WriteUInt16LittleEndian(extraFieldHeader[FieldLocations.Tag..], _tag); 41BinaryPrimitives.WriteUInt16LittleEndian(extraFieldHeader[FieldLocations.Size..], _size); 416BinaryPrimitives.WriteUInt16LittleEndian(extraFieldData[FieldLocations.Tag..], TagConstant); 417BinaryPrimitives.WriteUInt16LittleEndian(extraFieldData[FieldLocations.Size..], _size); 578BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.VersionMadeBy..], (ushort)ZipVersionNeededValues.Zip64); 580BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.VersionNeededToExtract..], (ushort)ZipVersionNeededValues.Zip64); 846BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(0), HeaderId); 847BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(2), DataSize); 848BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(4), VendorVersion); 852BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(9), CompressionMethod); 1091BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfThisDisk..], 0); 1093BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfTheDiskWithTheStartOfTheCentralDirectory..], 0); 1095BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectoryOnThisDisk..], numberOfEntriesTruncated); 1097BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectory..], numberOfEntriesTruncated); 1105BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.ArchiveCommentLength..], (ushort)archiveComment.Length);
System\IO\Compression\ZipCryptoStream.cs (2)
158BinaryPrimitives.WriteUInt16LittleEndian(header.Slice(10), (ushort)(crc >> 16)); 162BinaryPrimitives.WriteUInt16LittleEndian(header.Slice(10), _verifierLow2Bytes);
System.Net.Security (1)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
586BinaryPrimitives.WriteUInt16LittleEndian(targetInfoBuffer.AsSpan(2 + targetInfoOffset), (ushort)spnSize);
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (1)
275BinaryPrimitives.WriteUInt16LittleEndian(buffer, value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncProfiler.cs (1)
669BinaryPrimitives.WriteUInt16LittleEndian(eventBuffer.Data.AsSpan(payloadLengthFieldOffset), (ushort)payloadLength);
System.Reflection.Metadata (3)
System\Reflection\Internal\Utilities\BlobUtilities.cs (1)
26BinaryPrimitives.WriteUInt16LittleEndian(buffer.AsSpan(start), value);
System\Reflection\Metadata\BlobWriterImpl.cs (2)
187BinaryPrimitives.WriteUInt16LittleEndian(bytes, (char)value); 233BinaryPrimitives.WriteUInt16LittleEndian(bytes, (ushort)value);