2393 references to Slice
aspire (12)
Utils\ReparsePoint.cs (6)
441System.Buffers.Binary.BinaryPrimitives.WriteUInt16LittleEndian(span.Slice(4, 2), (ushort)reparseDataLength);
450System.Buffers.Binary.BinaryPrimitives.WriteUInt16LittleEndian(span.Slice(8, 2), (ushort)subNameOffset);
451System.Buffers.Binary.BinaryPrimitives.WriteUInt16LittleEndian(span.Slice(10, 2), (ushort)subNameLength);
452System.Buffers.Binary.BinaryPrimitives.WriteUInt16LittleEndian(span.Slice(12, 2), (ushort)printNameOffset);
453System.Buffers.Binary.BinaryPrimitives.WriteUInt16LittleEndian(span.Slice(14, 2), (ushort)printNameLength);
455subNameBytes.CopyTo(span[pathOffset..]);
Aspire.Dashboard (7)
Aspire.Hosting (7)
Aspire.Playground.Tests (1)
GenerateDocumentationAndConfigFiles (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
ILCompiler.Compiler (97)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (62)
1024BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), MH_MAGIC_64);
1025BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)CpuType);
1026BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), CpuSubType);
1027BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), FileType);
1028BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), NumberOfCommands);
1029BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), SizeOfCommands);
1030BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(24, 4), Flags);
1031BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(28, 4), Reserved);
1055BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_SEGMENT_64);
1056BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)(HeaderSize + NumberOfSections * MachSection.HeaderSize));
1057bool encoded = Encoding.UTF8.TryGetBytes(Name, buffer.Slice(8, 16), out _);
1059BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(24, 8), Address);
1060BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(32, 8), Size);
1061BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(40, 8), FileOffset);
1062BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(48, 8), FileSize);
1063BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), MaximumProtection);
1064BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), InitialProtection);
1065BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), NumberOfSections);
1066BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(68, 4), Flags);
1141bool encoded = Encoding.UTF8.TryGetBytes(SectionName, buffer.Slice(0, 16), out _);
1143encoded = Encoding.UTF8.TryGetBytes(SegmentName, buffer.Slice(16, 16), out _);
1145BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(32, 8), VirtualAddress);
1146BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(40, 8), Size);
1147BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(48, 4), FileOffset);
1148BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(52, 4), Log2Alignment);
1149BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), RelocationOffset);
1150BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), NumberOfRelocationEntries);
1151BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), Flags);
1193BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), nameIndex);
1196BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6, 2), Descriptor);
1216BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_SYMTAB);
1217BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1218BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), SymbolTableOffset);
1219BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), NumberOfSymbols);
1220BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), StringTableOffset);
1221BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), StringTableSize);
1254BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_DYSYMTAB);
1255BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1256BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), LocalSymbolsIndex);
1257BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), LocalSymbolsCount);
1258BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), ExternalSymbolsIndex);
1259BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), ExternalSymbolsCount);
1260BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(24, 4), UndefinedSymbolsIndex);
1261BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(28, 4), UndefinedSymbolsCount);
1262BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(32, 4), TableOfContentsOffset);
1263BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(36, 4), TableOfContentsCount);
1264BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(40, 4), ModuleTableOffset);
1265BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(44, 4), ModuleTableCount);
1266BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(48, 4), ExternalReferenceTableOffset);
1267BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(52, 4), ExternalReferenceTableCount);
1268BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), IndirectSymbolTableOffset);
1269BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), IndirectSymbolTableCount);
1270BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), ExternalRelocationTableOffset);
1271BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(68, 4), ExternalRelocationTableCount);
1272BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(72, 4), LocalRelocationTableOffset);
1273BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(76, 4), LocalRelocationTableCount);
1291BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_BUILD_VERSION);
1292BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1293BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), Platform);
1294BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), MinimumPlatformVersion);
1295BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), SdkVersion);
1296BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), 0); // No tools
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (8)
114WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), bodySizePrefixLength + _locals.Length);
219int adjustSize = expr.Encode(buffer.Slice(pos, encodeSizeExpected));
258WasmExpr.OffsetRelocationsByOffset(buffer.Slice(totalRelocsEncoded, relocsEncoded), offset);
354DwarfHelper.WritePaddedULEB128(buffer.Slice(0, relocSize), 0);
359DwarfHelper.WritePaddedSLEB128(buffer.Slice(0, relocSize), 0);
415WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), base.EncodeSize() + (int)DwarfHelper.SizeOfULEB128(_align));
472DwarfHelper.WritePaddedULEB128(buffer.Slice(pos, relocSize), 0);
508WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), base.EncodeSize());
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
ILCompiler.ReadyToRun (101)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (62)
1024BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), MH_MAGIC_64);
1025BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)CpuType);
1026BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), CpuSubType);
1027BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), FileType);
1028BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), NumberOfCommands);
1029BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), SizeOfCommands);
1030BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(24, 4), Flags);
1031BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(28, 4), Reserved);
1055BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_SEGMENT_64);
1056BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)(HeaderSize + NumberOfSections * MachSection.HeaderSize));
1057bool encoded = Encoding.UTF8.TryGetBytes(Name, buffer.Slice(8, 16), out _);
1059BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(24, 8), Address);
1060BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(32, 8), Size);
1061BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(40, 8), FileOffset);
1062BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(48, 8), FileSize);
1063BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), MaximumProtection);
1064BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), InitialProtection);
1065BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), NumberOfSections);
1066BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(68, 4), Flags);
1141bool encoded = Encoding.UTF8.TryGetBytes(SectionName, buffer.Slice(0, 16), out _);
1143encoded = Encoding.UTF8.TryGetBytes(SegmentName, buffer.Slice(16, 16), out _);
1145BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(32, 8), VirtualAddress);
1146BinaryPrimitives.WriteUInt64LittleEndian(buffer.Slice(40, 8), Size);
1147BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(48, 4), FileOffset);
1148BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(52, 4), Log2Alignment);
1149BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), RelocationOffset);
1150BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), NumberOfRelocationEntries);
1151BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), Flags);
1193BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), nameIndex);
1196BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(6, 2), Descriptor);
1216BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_SYMTAB);
1217BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1218BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), SymbolTableOffset);
1219BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), NumberOfSymbols);
1220BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), StringTableOffset);
1221BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), StringTableSize);
1254BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_DYSYMTAB);
1255BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1256BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), LocalSymbolsIndex);
1257BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), LocalSymbolsCount);
1258BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), ExternalSymbolsIndex);
1259BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), ExternalSymbolsCount);
1260BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(24, 4), UndefinedSymbolsIndex);
1261BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(28, 4), UndefinedSymbolsCount);
1262BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(32, 4), TableOfContentsOffset);
1263BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(36, 4), TableOfContentsCount);
1264BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(40, 4), ModuleTableOffset);
1265BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(44, 4), ModuleTableCount);
1266BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(48, 4), ExternalReferenceTableOffset);
1267BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(52, 4), ExternalReferenceTableCount);
1268BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(56, 4), IndirectSymbolTableOffset);
1269BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(60, 4), IndirectSymbolTableCount);
1270BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(64, 4), ExternalRelocationTableOffset);
1271BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(68, 4), ExternalRelocationTableCount);
1272BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(72, 4), LocalRelocationTableOffset);
1273BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(76, 4), LocalRelocationTableCount);
1291BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(0, 4), LC_BUILD_VERSION);
1292BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(4, 4), (uint)HeaderSize);
1293BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(8, 4), Platform);
1294BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(12, 4), MinimumPlatformVersion);
1295BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(16, 4), SdkVersion);
1296BinaryPrimitives.WriteUInt32LittleEndian(buffer.Slice(20, 4), 0); // No tools
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (8)
114WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), bodySizePrefixLength + _locals.Length);
219int adjustSize = expr.Encode(buffer.Slice(pos, encodeSizeExpected));
258WasmExpr.OffsetRelocationsByOffset(buffer.Slice(totalRelocsEncoded, relocsEncoded), offset);
354DwarfHelper.WritePaddedULEB128(buffer.Slice(0, relocSize), 0);
359DwarfHelper.WritePaddedSLEB128(buffer.Slice(0, relocSize), 0);
415WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), base.EncodeSize() + (int)DwarfHelper.SizeOfULEB128(_align));
472DwarfHelper.WritePaddedULEB128(buffer.Slice(pos, relocSize), 0);
508WasmExpr.OffsetRelocationsByOffset(buffer.Slice(0, relocsEncoded), base.EncodeSize());
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WebcilEncoder.cs (14)
47BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(0, 4), header.Id);
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);
52BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(12, 4), header.PeCliHeaderRva);
53BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(16, 4), header.PeCliHeaderSize);
54BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(20, 4), header.PeDebugRva);
55BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(24, 4), header.PeDebugSize);
61BinaryPrimitives.WriteUInt32LittleEndian(headerBuffer.Slice(28, 4), 0);
82BinaryPrimitives.WriteUInt32LittleEndian(header.Slice(0, 4), sectionHeader.VirtualSize);
83BinaryPrimitives.WriteUInt32LittleEndian(header.Slice(4, 4), sectionHeader.VirtualAddress);
84BinaryPrimitives.WriteUInt32LittleEndian(header.Slice(8, 4), sectionHeader.SizeOfRawData);
85BinaryPrimitives.WriteUInt32LittleEndian(header.Slice(12, 4), sectionHeader.PointerToRawData);
ILCompiler.TypeSystem (12)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
illink (10)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
ILLink.RoslynAnalyzer (10)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.Antiforgery (7)
Microsoft.AspNetCore.Components (5)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Components.Forms (4)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (2)
Microsoft.AspNetCore.Components.Web (4)
Microsoft.AspNetCore.DataProtection (33)
Managed\AesGcmAuthenticatedEncryptor.cs (10)
107var plaintext = buffer.Slice(0, plaintextBytes);
112? stackalloc byte[256].Slice(0, _keyDerivationKey.Length)
116? stackalloc byte[256].Slice(0, _derivedkeySizeInBytes)
244keyModifier.CopyTo(buffer.Slice(0, KEY_MODIFIER_SIZE_IN_BYTES));
245nonceBytes.CopyTo(buffer.Slice(KEY_MODIFIER_SIZE_IN_BYTES, NONCE_SIZE_IN_BYTES));
252? stackalloc byte[256].Slice(0, _keyDerivationKey.Length)
256? stackalloc byte[256].Slice(0, _derivedkeySizeInBytes)
275var nonce = buffer.Slice(KEY_MODIFIER_SIZE_IN_BYTES, NONCE_SIZE_IN_BYTES);
276var encrypted = buffer.Slice(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES, plaintext.Length);
277var tag = buffer.Slice(KEY_MODIFIER_SIZE_IN_BYTES + NONCE_SIZE_IN_BYTES + plaintext.Length, TAG_SIZE_IN_BYTES);
Managed\ManagedAuthenticatedEncryptor.cs (13)
114? stackalloc byte[256].Slice(0, _keyDerivationKey.Length)
119? stackalloc byte[128].Slice(0, _validationAlgorithmSubkeyLengthInBytes)
123? stackalloc byte[128].Slice(0, _symmetricAlgorithmSubkeyLengthInBytes)
198? stackalloc byte[128].Slice(0, keyModifierLength)
204keyModifier.CopyTo(buffer.Slice(0, keyModifierLength));
207var iv = buffer.Slice(keyModifierLength, ivLength);
212? stackalloc byte[256].Slice(0, _keyDerivationKey.Length)
217? stackalloc byte[128].Slice(0, _validationAlgorithmSubkeyLengthInBytes)
221? stackalloc byte[128].Slice(0, _symmetricAlgorithmSubkeyLengthInBytes)
245var ciphertextDestination = buffer.Slice(keyModifierLength + ivLength, cipherTextLength);
249var ivAndCipherTextSpan = buffer.Slice(keyModifierLength, ivLength + cipherTextLength);
250var macDestinationSpan = buffer.Slice(keyModifierLength + ivLength + cipherTextLength, macLength);
411? stackalloc byte[128].Slice(0, hashSize)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (1)
Microsoft.AspNetCore.Http.Abstractions (6)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.Http.Extensions (16)
src\aspnetcore\src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.HttpLogging (15)
src\aspnetcore\src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (6)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Server.HttpSys (17)
Microsoft.AspNetCore.Server.IIS (16)
Microsoft.AspNetCore.Server.Kestrel.Core (35)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.WebSockets (14)
src\aspnetcore\src\Shared\ValueStringBuilder\ValueStringBuilder.cs (13)
93string s = _chars.Slice(0, _pos).ToString();
112return _chars.Slice(0, _pos);
115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
117public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
121if (_chars.Slice(0, _pos).TryCopyTo(destination))
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
144_chars.Slice(index, count).Fill(value);
163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
222Span<char> dst = _chars.Slice(_pos, count);
238Span<char> dst = _chars.Slice(_pos, length);
268return _chars.Slice(origPos, length);
295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.WebUtilities (8)
Microsoft.Build (17)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.Build.Framework (26)
Microsoft.CodeAnalysis (20)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.Analyzers (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.CodeStyle (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.Extensions.Package (12)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.Razor.Compiler (8)
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.CodeAnalysis.Workspaces (20)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
Microsoft.Data.Analysis (5)
Microsoft.Diagnostics.DataContractReader.Contracts (7)
Microsoft.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.Cli.Utils (1)
Microsoft.DotNet.TemplateLocator (3)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Compliance.Abstractions (4)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (5)
Microsoft.Extensions.Configuration.EnvironmentVariables (10)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.DataIngestion (10)
Chunkers\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Extensions.Logging.Abstractions (10)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.Logging.Console (11)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.Logging.Generators (5)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.ML.Core (7)
Microsoft.ML.CpuMath (5)
CpuMathUtils.cs (5)
75TensorPrimitives.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), destination);
97TensorPrimitives.MultiplyAdd(source.Slice(0, count), scale, destination.Slice(0, count), result.Slice(0, count));
115TensorPrimitives.Add(source.Slice(0, count), destination.Slice(0, count), destination.Slice(0, count));
136TensorPrimitives.Multiply(left.Slice(0, count), right.Slice(0, count), destination.Slice(0, count));
Microsoft.ML.Data (2)
Microsoft.ML.DataView (1)
Microsoft.ML.FastTree (1)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tokenizers (77)
Model\CodeGenTokenizer.cs (13)
352span = mutatedInputSpan.Slice(0, span.Length + 1);
464List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
609span = mutatedInputSpan.Slice(0, span.Length + 1);
828span = mutatedInputSpan.Slice(0, span.Length + 1);
965span = mutatedInputSpan.Slice(0, span.Length + 1);
1147List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
1211List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
1482current = utf8bytes.Slice(incompleteUtf8BytesInBufferIndex, incompleteUtf8BytesInBuffer + span.Length);
1496vocabBuffer.Slice(0, completeCharsWritten).CopyTo(buffer);
1663if (_vocab.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, string Token) value))
Model\SentencePieceUnigramModel.cs (13)
531normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
559normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
582int normalizationCount = Normalizer!.Normalize(byteSpan.Slice(0, byteCount), ref normalizationSpan, ref normalizedArrayPool);
583normalizationSpan = normalizationSpan.Slice(0, normalizationCount);
597normalizationSpan = byteSpan.Slice(0, byteCount);
637string stringToken = node.Id == UnknownId ? Helpers.GetString(normalizationSpan.Slice(node.StartsAt, endsAt - node.StartsAt)) : _vocabReverse[node.Id].Piece;
986normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
1008normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
1173ReadOnlySpan<byte> utf8UnknownBytes = normalizationSpan.Slice(unknownTokensTracking![j].Utf8Index, unknownTokensTracking![j].Utf8Length);
1366normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
1388normalizedText = normalizedString.AsSpan().Slice(0, normalizedStringIndex).ToString();
1480charsConsumed += Helpers.GetUtf16LengthFromUtf8Bytes(normalizationSpan.Slice(ids[i].UtfStartOffset, ids[i].Utf8Length));
1701consumedCharacters += Helpers.GetUtf16LengthFromUtf8Bytes(normalizationSpan.Slice(node.StartsAt, length));
Model\TiktokenTokenizer.cs (8)
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));
829return Helpers.GetString(utf8Bytes.Slice(0, utf8ByteCount));
922tempBuffer.Slice(0, incompleteCharsWritten).CopyTo(buffer);
945if (!Helpers.ConvertUtf8ToUtf16(utf8Bytes.Slice(utf8BytesIncompleteIndex, utf8BytesIncompleteCount + tokenBytes.Length), tempBuffer, out int bytesConsumed, out int charsConsumed))
955tempBuffer.Slice(0, charsConsumed).CopyTo(buffer);
Utils\ValueStringBuilder.cs (19)
95Span<char> span = _chars.Slice(0, _pos);
104string s = _chars.Slice(0, _pos).ToString();
123return _chars.Slice(0, _pos);
137public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
138public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
139public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
143if (_chars.Slice(0, _pos).TryCopyTo(destination))
165ReadOnlySpan<char> buffer = _chars.Slice(index, _pos - index);
180_chars.Slice(newIndex, _pos - newIndex).CopyTo(_chars.Slice(index + newLength));
189_chars.Slice(newIndex, _pos - newIndex).CopyTo(_chars.Slice(index + newLength));
213_chars.Slice(start + length, remaining).CopyTo(_chars.Slice(start));
226return _chars.Slice(_pos - valueLength, valueLength).SequenceEqual(value.AsSpan());
237_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
238_chars.Slice(index, count).Fill(value);
257_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
325Span<char> dst = _chars.Slice(_pos, count);
341Span<char> dst = _chars.Slice(_pos, length);
371return _chars.Slice(origPos, length);
407_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.ML.Tokenizers.Tests (23)
LlamaTests.cs (11)
310status = tokenizer.Decode(ids, destinationBuffer.AsSpan().Slice(0, i), out idsConsumed, out charactersWritten);
848Assert.Equal(OperationStatus.DestinationTooSmall, tokenizer.Decode(ids, destinationBuffer.AsSpan().Slice(0, i), out idsConsumed, out charactersWritten));
850Assert.True(decodedWithNoSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten)));
862Assert.Equal(OperationStatus.DestinationTooSmall, tokenizer.Decode(ids, destinationBuffer.AsSpan().Slice(0, i), considerSpecialTokens: true, out idsConsumed, out charactersWritten));
864Assert.True(textWithSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten)));
887Assert.Equal(OperationStatus.DestinationTooSmall, tokenizerWithSuffix.Decode(ids, destinationBuffer.AsSpan().Slice(0, i), out idsConsumed, out charactersWritten));
889Assert.True(decodedWithNoSpecialTokens.AsSpan().StartsWith(destinationBuffer.AsSpan().Slice(0, charactersWritten)));
895Assert.Equal(decodedWithNoSpecialTokens, destinationBuffer.AsSpan().Slice(0, charactersWritten).ToString());
901Assert.Equal(OperationStatus.DestinationTooSmall, tokenizerWithSuffix.Decode(ids, destinationBuffer.AsSpan().Slice(0, i), considerSpecialTokens: true, out idsConsumed, out charactersWritten));
903var sp = destinationBuffer.AsSpan().Slice(0, charactersWritten);
906sp = sp.Slice(0, sp.Length - 1);
UnigramTests.cs (3)
545Assert.Equal(decodedString, buffer.AsSpan().Slice(0, charsWritten).ToString());
549status = tokenizer.Decode(ids, buffer.AsSpan().Slice(0, i), considerSpecialTokens: false, out idsConsumed, out charsWritten);
551Assert.Equal(decodedString.AsSpan().Slice(0, charsWritten).ToString(), buffer.AsSpan().Slice(0, charsWritten).ToString());
Microsoft.ML.Transforms (4)
Microsoft.NET.Build.Containers (1)
Microsoft.NET.Build.Tasks (3)
Microsoft.Net.Http.Headers (1)
Microsoft.NET.Sdk.WorkloadManifestReader (3)
Microsoft.Private.Windows.Core (31)
System\Text\ValueStringBuilder.cs (11)
134public readonly ReadOnlySpan<char> AsSpan(int start) => _chars[start.._pos];
135public readonly ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
161_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]);
162_chars.Slice(index, count).Fill(value);
181_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]);
182s.CopyTo(_chars[index..]);
236s.CopyTo(_chars[pos..]);
245while (!((ISpanFormattable)value).TryFormat(_chars[_pos..], out charsWritten, format: default, provider: default))
265Span<char> dst = _chars.Slice(_pos, count);
282Span<char> dst = _chars.Slice(_pos, length);
299value.CopyTo(_chars[_pos..]);
Microsoft.TestPlatform.AdapterUtilities (1)
Microsoft.Win32.Registry (5)
PresentationCore (2)
PresentationFramework (6)
MS\Internal\AppModel\ResourceContainer.cs (6)
210UpdateCachedRMW(key.Slice(0, assemblyName.Length), assembly);
216UpdateCachedRMW(key.Slice(0, assemblyName.Length + assemblyVersion.Length), assembly);
225UpdateCachedRMW(key.Slice(0, totalLength), assembly);
230UpdateCachedRMW(key.Slice(0, assemblyName.Length + assemblyToken.Length), assembly);
273if (!s_registeredResourceManagersLookup.TryGetValue(key.Slice(0, totalLength), out rmwResult))
286s_registeredResourceManagersLookup[key.Slice(0, totalLength)] = rmwResult;
Roslyn.Diagnostics.Analyzers (19)
src\roslyn\src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
762InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
768HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
773int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer!);
776IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit, comparer!);
1001InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1007HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1012int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1015IntroSort(keys.Slice(p + 1, partitionSize - (p + 1)), values.Slice(p + 1, partitionSize - (p + 1)), depthLimit);
System.Collections (1)
System.Collections.Immutable (1)
System.Collections.Specialized (1)
System.Console (19)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.DiagnosticSource (13)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.FileVersionInfo (1)
System.Diagnostics.PerformanceCounter (2)
System.Diagnostics.Process (13)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Diagnostics.TextWriterTraceListener (3)
System.DirectoryServices.Protocols (7)
System.Drawing.Common (4)
System.Formats.Asn1 (27)
System.Formats.Cbor (5)
System.Formats.Nrbf (1)
System.Formats.Tar (36)
System.IO.Compression (117)
System\IO\Compression\ZipArchiveEntry.cs (38)
863ZipCentralDirectoryFileHeader.SignatureConstantBytes.CopyTo(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.Signature..]);
866BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.VersionNeededToExtract..], (ushort)_versionToExtract);
867BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.GeneralPurposeBitFlags..], (ushort)_generalPurposeBitFlag);
872BinaryPrimitives.WriteUInt16LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.CompressionMethod..], compressionMethodToWrite);
874BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.LastModified..], ZipHelper.DateTimeToDosTime(_lastModified.DateTime));
877BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.Crc32..], crcToWrite);
878BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.CompressedSize..], compressedSizeTruncated);
879BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.UncompressedSize..], uncompressedSizeTruncated);
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);
885BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.ExternalFileAttributes..], _externalFileAttr);
886BinaryPrimitives.WriteUInt32LittleEndian(cdStaticHeader[ZipCentralDirectoryFileHeader.FieldLocations.RelativeOffsetOfLocalHeader..], offsetOfLocalHeaderTruncated);
1735ZipLocalFileHeader.SignatureConstantBytes.CopyTo(lfStaticHeader[ZipLocalFileHeader.FieldLocations.Signature..]);
1736BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.VersionNeededToExtract..], (ushort)_versionToExtract);
1737BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.GeneralPurposeBitFlags..], (ushort)_generalPurposeBitFlag);
1741BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.CompressionMethod..], compressionMethodToWrite);
1743BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.LastModified..], ZipHelper.DateTimeToDosTime(_lastModified.DateTime));
1744BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.Crc32..], crc32);
1745BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.CompressedSize..], compressedSizeTruncated);
1746BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.UncompressedSize..], uncompressedSizeTruncated);
1747BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.FilenameLength..], (ushort)_storedEntryNameBytes.Length);
1748BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[ZipLocalFileHeader.FieldLocations.ExtraFieldLength..], extraFieldLength);
2071BinaryPrimitives.WriteUInt16LittleEndian(writeBuffer[relativeVersionToExtractLocation..], (ushort)_versionToExtract);
2072BinaryPrimitives.WriteUInt16LittleEndian(writeBuffer[relativeGeneralPurposeBitFlagsLocation..], (ushort)_generalPurposeBitFlag);
2086BinaryPrimitives.WriteUInt32LittleEndian(writeBuffer[relativeCrc32Location..], crcToWrite);
2087BinaryPrimitives.WriteUInt32LittleEndian(writeBuffer[relativeCompressedSizeLocation..], compressedSizeTruncated);
2088BinaryPrimitives.WriteUInt32LittleEndian(writeBuffer[relativeUncompressedSizeLocation..], uncompressedSizeTruncated);
2104BinaryPrimitives.WriteInt64LittleEndian(writeBuffer[relativeUncompressedSizeLocation..], _uncompressedSize);
2105BinaryPrimitives.WriteInt64LittleEndian(writeBuffer[relativeCompressedSizeLocation..], _compressedSize);
2139ZipLocalFileHeader.DataDescriptorSignatureConstantBytes.CopyTo(dataDescriptor[ZipLocalFileHeader.ZipDataDescriptor.FieldLocations.Signature..]);
2142BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[ZipLocalFileHeader.ZipDataDescriptor.FieldLocations.Crc32..], crcToWrite);
2146BinaryPrimitives.WriteInt64LittleEndian(dataDescriptor[ZipLocalFileHeader.Zip64DataDescriptor.FieldLocations.CompressedSize..], _compressedSize);
2147BinaryPrimitives.WriteInt64LittleEndian(dataDescriptor[ZipLocalFileHeader.Zip64DataDescriptor.FieldLocations.UncompressedSize..], _uncompressedSize);
2153BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[ZipLocalFileHeader.ZipDataDescriptor.FieldLocations.CompressedSize..], (uint)_compressedSize);
2154BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[ZipLocalFileHeader.ZipDataDescriptor.FieldLocations.UncompressedSize..], (uint)_uncompressedSize);
System\IO\Compression\ZipBlocks.cs (58)
40BinaryPrimitives.WriteUInt16LittleEndian(extraFieldHeader[FieldLocations.Tag..], _tag);
41BinaryPrimitives.WriteUInt16LittleEndian(extraFieldHeader[FieldLocations.Size..], _size);
416BinaryPrimitives.WriteUInt16LittleEndian(extraFieldData[FieldLocations.Tag..], TagConstant);
417BinaryPrimitives.WriteUInt16LittleEndian(extraFieldData[FieldLocations.Size..], _size);
421BinaryPrimitives.WriteInt64LittleEndian(extraFieldData[startOffset..], _uncompressedSize.Value);
427BinaryPrimitives.WriteInt64LittleEndian(extraFieldData[startOffset..], _compressedSize.Value);
433BinaryPrimitives.WriteInt64LittleEndian(extraFieldData[startOffset..], _localHeaderOffset.Value);
439BinaryPrimitives.WriteUInt32LittleEndian(extraFieldData[startOffset..], _startDiskNumber.Value);
474NumberOfDiskWithZip64EOCD = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.NumberOfDiskWithZip64EOCD..]),
475OffsetOfZip64EOCD = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.OffsetOfZip64EOCD..]),
476TotalNumberOfDisks = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.TotalNumberOfDisks..])
495SignatureConstantBytes.CopyTo(blockContents[FieldLocations.Signature..]);
497BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.NumberOfDiskWithZip64EOCD..], 0);
498BinaryPrimitives.WriteInt64LittleEndian(blockContents[FieldLocations.OffsetOfZip64EOCD..], zip64EOCDRecordStart);
500BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.TotalNumberOfDisks..], 1);
547SizeOfThisRecord = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.SizeOfThisRecord..]),
548VersionMadeBy = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.VersionMadeBy..]),
549VersionNeededToExtract = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.VersionNeededToExtract..]),
550NumberOfThisDisk = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.NumberOfThisDisk..]),
551NumberOfDiskWithStartOfCD = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.NumberOfDiskWithStartOfCD..]),
552NumberOfEntriesOnThisDisk = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.NumberOfEntriesOnThisDisk..]),
553NumberOfEntriesTotal = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.NumberOfEntriesTotal..]),
554SizeOfCentralDirectory = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.SizeOfCentralDirectory..]),
555OffsetOfCentralDirectory = BinaryPrimitives.ReadUInt64LittleEndian(blockContents[FieldLocations.OffsetOfCentralDirectory..])
575SignatureConstantBytes.CopyTo(blockContents[FieldLocations.Signature..]);
576BinaryPrimitives.WriteUInt64LittleEndian(blockContents[FieldLocations.SizeOfThisRecord..], NormalSize);
578BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.VersionMadeBy..], (ushort)ZipVersionNeededValues.Zip64);
580BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.VersionNeededToExtract..], (ushort)ZipVersionNeededValues.Zip64);
582BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.NumberOfThisDisk..], 0);
584BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.NumberOfDiskWithStartOfCD..], 0);
586BinaryPrimitives.WriteInt64LittleEndian(blockContents[FieldLocations.NumberOfEntriesOnThisDisk..], numberOfEntries);
588BinaryPrimitives.WriteInt64LittleEndian(blockContents[FieldLocations.NumberOfEntriesTotal..], numberOfEntries);
589BinaryPrimitives.WriteInt64LittleEndian(blockContents[FieldLocations.SizeOfCentralDirectory..], sizeOfCentralDirectory);
590BinaryPrimitives.WriteInt64LittleEndian(blockContents[FieldLocations.OffsetOfCentralDirectory..], startOfCentralDirectory);
619filenameLength = BinaryPrimitives.ReadUInt16LittleEndian(fixedHeaderBuffer[relativeFilenameLengthLocation..]);
620extraFieldLength = BinaryPrimitives.ReadUInt16LittleEndian(fixedHeaderBuffer[relativeExtraFieldLengthLocation..]);
644Span<byte> extraFieldBuffer = extraFieldLength <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, extraFieldLength) : arrayPoolBuffer.AsSpan(0, extraFieldLength);
687ushort filenameLength = BinaryPrimitives.ReadUInt16LittleEndian(blockBytes[relativeFilenameLengthLocation..]);
688ushort extraFieldLength = BinaryPrimitives.ReadUInt16LittleEndian(blockBytes[relativeExtraFieldLengthLocation..]);
1026Span<byte> collatedHeader = dynamicHeaderSize <= StackAllocationThreshold ? stackalloc byte[StackAllocationThreshold].Slice(0, dynamicHeaderSize) : arrayPoolBuffer.AsSpan(0, dynamicHeaderSize);
1030Debug.Assert(bytesToRead == collatedHeader[remainingBufferLength..].Length);
1031int realBytesRead = furtherReads.ReadAtLeast(collatedHeader[remainingBufferLength..], bytesToRead, throwOnEndOfStream: false);
1089SignatureConstantBytes.CopyTo(blockContents[FieldLocations.Signature..]);
1091BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfThisDisk..], 0);
1093BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfTheDiskWithTheStartOfTheCentralDirectory..], 0);
1095BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectoryOnThisDisk..], numberOfEntriesTruncated);
1097BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectory..], numberOfEntriesTruncated);
1098BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.SizeOfCentralDirectory..], sizeOfCentralDirectoryTruncated);
1099BinaryPrimitives.WriteUInt32LittleEndian(blockContents[FieldLocations.OffsetOfStartOfCentralDirectoryWithRespectToTheStartingDiskNumber..], startOfCentralDirectoryTruncated);
1105BinaryPrimitives.WriteUInt16LittleEndian(blockContents[FieldLocations.ArchiveCommentLength..], (ushort)archiveComment.Length);
1137Signature = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.Signature..]),
1138NumberOfThisDisk = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.NumberOfThisDisk..]),
1139NumberOfTheDiskWithTheStartOfTheCentralDirectory = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.NumberOfTheDiskWithTheStartOfTheCentralDirectory..]),
1140NumberOfEntriesInTheCentralDirectoryOnThisDisk = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectoryOnThisDisk..]),
1141NumberOfEntriesInTheCentralDirectory = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.NumberOfEntriesInTheCentralDirectory..]),
1142SizeOfCentralDirectory = BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.SizeOfCentralDirectory..]),
1144BinaryPrimitives.ReadUInt32LittleEndian(blockContents[FieldLocations.OffsetOfStartOfCentralDirectoryWithRespectToTheStartingDiskNumber..])
1147ushort commentLength = BinaryPrimitives.ReadUInt16LittleEndian(blockContents[FieldLocations.ArchiveCommentLength..]);
System.IO.Compression.Brotli (2)
System.IO.FileSystem.AccessControl (11)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.IO.FileSystem.Watcher (11)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.IO.Hashing (4)
System.IO.MemoryMappedFiles (1)
System.Linq (1)
System.Memory (2)
System.Net.Http (42)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (7)
457string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveLength)));
683GetFrameData(_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength), frameHeader.PaddedFlag, frameHeader.PriorityFlag),
699_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength),
767ReadOnlySpan<byte> span = _incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength);
800ReadOnlySpan<byte> frameData = GetFrameData(_incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength), hasPad: frameHeader.PaddedFlag, hasPriority: false);
854ReadOnlySpan<byte> settings = _incomingBuffer.ActiveSpan.Slice(0, frameHeader.PayloadLength);
1016ReadOnlySpan<byte> pingContent = _incomingBuffer.ActiveSpan.Slice(0, FrameHeader.PingLength);
System.Net.Http.WinHttpHandler (1)
System.Net.HttpListener (1)
System.Net.Mail (14)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Net.NameResolution (10)
System.Net.Ping (1)
System.Net.Primitives (5)
src\runtime\src\libraries\Common\src\System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs (1)
48.Slice(0, bufferSize);
System.Net.Quic (1)
System.Net.Requests (1)
System.Net.Security (25)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (14)
458Span<byte> blob = payload.Slice(payloadOffset, sizeof(NtChallengeResponse) + serverInfo.Length);
459ref NtChallengeResponse temp = ref MemoryMarshal.AsRef<NtChallengeResponse>(blob.Slice(0, sizeof(NtChallengeResponse)));
697ref AuthenticateMessage response = ref MemoryMarshal.AsRef<AuthenticateMessage>(responseAsSpan.Slice(0, sizeof(AuthenticateMessage)));
720payload.Slice(payloadOffset, ChallengeResponseLength).Clear();
741int sessionKeyWritten = HMACMD5.HashData(ntlm2hash, responseAsSpan.Slice(response.NtChallengeResponse.PayloadOffset, 16), sessionBaseKey);
747Span<byte> encryptedRandomSessionKey = payload.Slice(payloadOffset, 16);
800hmac.AppendData(signature.Slice(12, 4));
804seal.Transform(hmacResult.Slice(0, 8), signature.Slice(4, 8));
846_clientSeal.Transform(input, output.Slice(SignatureLength, input.Length));
847CalculateSignature(input, _clientSequenceNumber, _clientSigningKey, _clientSeal, output.Slice(0, SignatureLength));
871_serverSeal.Transform(input.Slice(SignatureLength), output.Slice(0, input.Length - SignatureLength));
872if (!VerifyMIC(output.Slice(0, input.Length - SignatureLength), input.Slice(0, SignatureLength)))
900if (!VerifyMIC(input.Slice(SignatureLength), input.Slice(0, SignatureLength)))
System.Net.Sockets (13)
System\Net\Sockets\Socket.cs (11)
160new IPAddress((long)SocketAddressPal.GetIPv4Address(buffer.Slice(0, bufferLength)) & 0x0FFFFFFFF),
166SocketAddressPal.GetIPv6Address(buffer.Slice(0, bufferLength), address, out uint scope);
175_rightEndPoint = new UnixDomainSocketEndPoint(buffer.Slice(0, bufferLength));
194new IPAddress((long)SocketAddressPal.GetIPv4Address(buffer.Slice(0, bufferLength)) & 0x0FFFFFFFF),
200SocketAddressPal.GetIPv6Address(buffer.Slice(0, bufferLength), address, out uint scope);
209_remoteEndPoint = new UnixDomainSocketEndPoint(buffer.Slice(0, bufferLength));
329_localEndPoint = IPEndPointExtensions.CreateIPEndPoint(buffer.Slice(0, size));
334buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span);
375_remoteEndPoint = IPEndPointExtensions.CreateIPEndPoint(buffer.Slice(0, size));
380buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span);
816socketAddress.Buffer.Span.Slice(0, socketAddress.Size));
System.Net.WebProxy (1)
System.Net.WebSockets (11)
System\Net\WebSockets\ManagedWebSocket.cs (9)
926_receiveBuffer.Span.Slice(_receiveBufferOffset, receiveBufferBytesToCopy).CopyTo(
955_inflater!.Span.Slice(0, totalBytesReceived) :
956payloadBuffer.Span.Slice(0, totalBytesReceived), header.Mask, _receivedMaskOffsetOffset);
981!TryValidateUtf8(payloadBuffer.Span.Slice(0, totalBytesReceived), header.EndOfMessage, _utf8TextState))
1099ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
1112closeStatusDescription = s_textEncoding.GetString(_receiveBuffer.Span.Slice(_receiveBufferOffset + 2, (int)header.PayloadLength - 2));
1203ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
1222long pongPayload = BinaryPrimitives.ReadInt64BigEndian(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength));
1613_receiveBuffer.Span.Slice(_receiveBufferOffset, _receiveBufferCount).CopyTo(_receiveBuffer.Span);
System.Numerics.Tensors (18)
System.Private.CoreLib (294)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (2)
576status = DecodeFrom<TBase64Decoder, byte>(decoder, buffer.Slice(0, bufferIdx), bytes, out int localConsumed, out int localWritten, localIsFinalBlock, ignoreWhiteSpace: false);
681status = DecodeFrom(decoder, buffer.Slice(0, bufferIdx), bytes, out int localConsumed, out int localWritten, localIsFinalBlock, ignoreWhiteSpace: false);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (7)
535Span<int> thisRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)thisArray).Slice(i, roundedBytesRemaining));
536Span<int> valueRemaining = MemoryMarshal.Cast<byte, int>(((Span<byte>)valueArray).Slice(i, roundedBytesRemaining));
633intSpan.Slice((int)fromIndex, ints - fromIndex).CopyTo(intSpan);
653intSpan.Slice(toIndex, ints - toIndex).Clear();
685intSpan.Slice(0, lastIndex + 1 - lengthToClear).CopyTo(intSpan.Slice(lengthToClear));
708intSpan.Slice(0, lengthToClear).Clear();
777Span<int> source = MemoryMarshal.Cast<byte, int>((Span<byte>)_array).Slice(0, intLength);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (27)
160InsertionSort(keys.Slice(0, partitionSize), comparer);
166HeapSort(keys.Slice(0, partitionSize), comparer);
171int p = PickPivotAndPartition(keys.Slice(0, partitionSize), comparer);
439InsertionSort(keys.Slice(0, partitionSize));
445HeapSort(keys.Slice(0, partitionSize));
450int p = PickPivotAndPartition(keys.Slice(0, partitionSize));
704InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
710HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
715int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
933InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
939HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
944int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize));
1228InsertionSort(keys.Slice(0, partitionSize), comparer);
1234HeapSort(keys.Slice(0, partitionSize), comparer);
1239int p = PickPivotAndPartition(keys.Slice(0, partitionSize), comparer);
1441InsertionSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
1447HeapSort(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
1452int p = PickPivotAndPartition(keys.Slice(0, partitionSize), values.Slice(0, partitionSize), comparer);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (54)
787result.Append(chars.Slice(0, charCount));
844Number.WriteTwoDigits((uint)offset.Hours, offsetSpan.Slice(0, 2));
846Number.WriteTwoDigits((uint)offset.Minutes, offsetSpan.Slice(3, 2));
888Number.WriteTwoDigits((uint)offset.Hours, hoursMinutes.Slice(0, 2));
890Number.WriteTwoDigits((uint)offset.Minutes, hoursMinutes.Slice(3, 2));
977return span.Slice(0, charsWritten).ToString();
1338Number.WriteTwoDigits((uint)hour, destination.Slice(0, 2));
1340Number.WriteTwoDigits((uint)minute, destination.Slice(3, 2));
1342Number.WriteTwoDigits((uint)second, destination.Slice(6, 2));
1344Number.WriteDigits((uint)fraction, destination.Slice(9, 7));
1363Number.WriteTwoDigits((uint)hour, destination.Slice(0, 2));
1365Number.WriteTwoDigits((uint)minute, destination.Slice(3, 2));
1367Number.WriteTwoDigits((uint)second, destination.Slice(6, 2));
1387Number.WriteFourDigits((uint)year, destination.Slice(0, 4));
1389Number.WriteTwoDigits((uint)month, destination.Slice(5, 2));
1391Number.WriteTwoDigits((uint)day, destination.Slice(8, 2));
1423Number.WriteTwoDigits((uint)day, destination.Slice(5, 2));
1430Number.WriteFourDigits((uint)year, destination.Slice(12, 4));
1475Span<TChar> dest = destination.Slice(0, FormatOMinLength);
1477Number.WriteFourDigits((uint)year, dest.Slice(0, 4));
1479Number.WriteTwoDigits((uint)month, dest.Slice(5, 2));
1481Number.WriteTwoDigits((uint)day, dest.Slice(8, 2));
1484Number.WriteTwoDigits((uint)hour, dest.Slice(11, 2));
1486Number.WriteTwoDigits((uint)minute, dest.Slice(14, 2));
1488Number.WriteTwoDigits((uint)second, dest.Slice(17, 2));
1490Number.WriteDigits((uint)tick, dest.Slice(20, 7));
1505Span<TChar> suffix = destination.Slice(FormatOMinLength, 6);
1507Number.WriteTwoDigits((uint)offsetHours, suffix.Slice(1, 2));
1509Number.WriteTwoDigits((uint)offsetMinutes, suffix.Slice(4, 2));
1535Number.WriteFourDigits((uint)year, destination.Slice(0, 4));
1537Number.WriteTwoDigits((uint)month, destination.Slice(5, 2));
1539Number.WriteTwoDigits((uint)day, destination.Slice(8, 2));
1542Number.WriteTwoDigits((uint)hour, destination.Slice(11, 2));
1544Number.WriteTwoDigits((uint)minute, destination.Slice(14, 2));
1546Number.WriteTwoDigits((uint)second, destination.Slice(17, 2));
1572Number.WriteFourDigits((uint)year, destination.Slice(0, 4));
1574Number.WriteTwoDigits((uint)month, destination.Slice(5, 2));
1576Number.WriteTwoDigits((uint)day, destination.Slice(8, 2));
1579Number.WriteTwoDigits((uint)hour, destination.Slice(11, 2));
1581Number.WriteTwoDigits((uint)minute, destination.Slice(14, 2));
1583Number.WriteTwoDigits((uint)second, destination.Slice(17, 2));
1623Number.WriteTwoDigits((uint)day, destination.Slice(5, 2));
1630Number.WriteFourDigits((uint)year, destination.Slice(12, 4));
1633Number.WriteTwoDigits((uint)hour, destination.Slice(17, 2));
1635Number.WriteTwoDigits((uint)minute, destination.Slice(20, 2));
1637Number.WriteTwoDigits((uint)second, destination.Slice(23, 2));
1673Number.WriteTwoDigits((uint)month, destination.Slice(0, 2));
1675Number.WriteTwoDigits((uint)day, destination.Slice(3, 2));
1677Number.WriteFourDigits((uint)year, destination.Slice(6, 4));
1681Number.WriteTwoDigits((uint)hour, destination.Slice(11, 2));
1683Number.WriteTwoDigits((uint)minute, destination.Slice(14, 2));
1685Number.WriteTwoDigits((uint)second, destination.Slice(17, 2));
1700Number.WriteTwoDigits((uint)offsetHours, destination.Slice(21, 2));
1702Number.WriteTwoDigits((uint)offsetMinutes, destination.Slice(24, 2));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (14)
88return new string(destination.Slice(0, charsWritten));
99return new string(destination.Slice(0, charsWritten));
243Number.WriteDigits(days, destination.Slice(pos, dayDigits));
270Span<TChar> suffix = destination.Slice(pos, suffixLen);
272Number.WriteTwoDigits(hours, suffix.Slice(0, 2));
274Number.WriteTwoDigits((uint)minutes, suffix.Slice(3, 2));
276Number.WriteTwoDigits((uint)seconds, suffix.Slice(6, 2));
290decimalSeparator.CopyTo(suffix.Slice(8, decSepLen));
293Number.WriteDigits(fraction, suffix.Slice(8 + decSepLen, fractionDigits));
311Span<TChar> suffix = destination.Slice(pos, suffixLen);
315Number.WriteTwoDigits((uint)minutes, suffix.Slice(2, 2));
317Number.WriteTwoDigits((uint)seconds, suffix.Slice(5, 2));
331decimalSeparator.CopyTo(suffix.Slice(7, decSepLen));
334Number.WriteDigits(fraction, suffix.Slice(7 + decSepLen, fractionDigits));
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (10)
4788destination = destination.Slice(0, source.Length);
4801destination = destination.Slice(0, source.Length);
4840ReplaceAny(destination.Slice(0, source.Length), values, newValue);
4890ReplaceAnyExcept(destination.Slice(0, source.Length), values, newValue);
5333Span<Range> destinationMinusOne = destination.Slice(0, destination.Length - 1);
6332_destination.Slice(_pos, paddingRequired).Fill(' ');
6337_destination.Slice(_pos, paddingRequired).Fill(' ');
6450_destination.Slice(_pos, paddingNeeded).Fill(' ');
6454_destination.Slice(startingPos, charsWritten).CopyTo(_destination.Slice(startingPos + paddingNeeded));
6455_destination.Slice(startingPos, paddingNeeded).Fill(' ');
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (6)
78return span.Slice(start, length);
95=> span.Slice(0, ClampEnd(span, 0, trimElement));
346return span.Slice(start, length);
390return span.Slice(0, ClampEnd(span, 0, trimElements));
817return span.Slice(start, end - start + 1);
833=> span.Slice(0, ClampEnd(span, 0));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (16)
418ReadOnlySpan<byte> dig = number.Digits.Slice(0, digitCount);
1797WriteTwoDigits(value, buffer.Slice(0, 2));
1873Int32ToHexChars(destination.Slice(0, bufferLength), (uint)value, hexBase);
1921UInt32ToBinaryChars(destination.Slice(0, bufferLength), value);
1962WriteTwoDigits(value, destination.Slice(0, 2));
1963WriteTwoDigits(remainder, destination.Slice(2, 2));
2163Int64ToHexChars(destination.Slice(0, bufferLength), (ulong)value, hexBase);
2227UInt64ToBinaryChars(destination.Slice(0, bufferLength), value);
2317WriteTwoDigits((uint)value, buffer.Slice(0, 2));
2477digits.Slice(start, i).CopyTo(digits);
2571Int128ToHexChars(destination.Slice(0, bufferLength), uValue, hexBase);
2582Int64ToHexChars(buffer.Slice(0, upperLength), value.Upper, hexBase);
2626UInt128ToBinaryChars(destination.Slice(0, bufferLength), uValue);
2637UInt64ToBinaryChars(buffer.Slice(0, upperLength), value.Upper);
2661digits.Slice(start, i).CopyTo(digits);
2692buffer = buffer.Slice(0, index);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (4)
235combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
266if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount))
291combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
334if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount)
System.Private.CoreLib.Generators (5)
System.Private.DataContractSerialization (2)
System.Private.Uri (25)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Private.Windows.Core (23)
System\Text\ValueStringBuilder.cs (11)
134public readonly ReadOnlySpan<char> AsSpan(int start) => _chars[start.._pos];
135public readonly ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
161_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]);
162_chars.Slice(index, count).Fill(value);
181_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]);
182s.CopyTo(_chars[index..]);
236s.CopyTo(_chars[pos..]);
245while (!((ISpanFormattable)value).TryFormat(_chars[_pos..], out charsWritten, format: default, provider: default))
265Span<char> dst = _chars.Slice(_pos, count);
282Span<char> dst = _chars.Slice(_pos, length);
299value.CopyTo(_chars[_pos..]);
System.Private.Windows.GdiPlus (1)
System.Private.Xml (14)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Reflection.Metadata (12)
System.Runtime.Numerics (167)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder_1.cs (12)
102Span<TChar> slice = _chars.Slice(0, _pos);
136return _chars.Slice(0, _pos);
139public readonly ReadOnlySpan<TChar> AsSpan() => _chars.Slice(0, _pos);
140public readonly ReadOnlySpan<TChar> AsSpan(int start) => _chars.Slice(start, _pos - start);
141public readonly ReadOnlySpan<TChar> AsSpan(int start, int length) => _chars.Slice(start, length);
145if (_chars.Slice(0, _pos).TryCopyTo(destination))
167_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
168_chars.Slice(index, count).Fill(value);
187_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
247Span<TChar> dst = _chars.Slice(_pos, count);
265return _chars.Slice(origPos, length);
301_chars.Slice(0, _pos).CopyTo(poolArray);
System\Number.BigInteger.cs (24)
394ReadOnlySpan<byte> intDigits= number.Digits.Slice(0, Math.Min(number.Scale, number.DigitsCount));
480leading = leading.Slice(0, BigIntegerCalculator.ActualLength(leading));
521ReadOnlySpan<nuint> buffer2 = buffer.Slice(0, BigIntegerCalculator.ActualLength(buffer));
522Span<nuint> bitsUpper = bits.Slice(multiplierTrailingZeroCount, buffer2.Length + multiplier.Length);
529BigIntegerCalculator.AddSelf(bits, buffer.Slice(0, BigIntegerCalculator.ActualLength(buffer)));
547nuint carry = MultiplyAdd(bits.Slice(0, resultLength), PowersOf1e9.TenPowMaxPartial, 0);
558nuint carry = MultiplyAdd(bits.Slice(0, resultLength), multiplier, 0);
578nuint carry = MultiplyAdd(bits.Slice(0, resultLength), PowersOf1e9.TenPowMaxPartial, base1E9[i]);
631bits = bits.Slice(0, bytesWrittenOrNeeded);
715bytes = bytes.Slice(0, bytesWrittenOrNeeded);
898BigIntegerToDecChars(destination.Slice(sNegative.Length, strDigits), base1E9Value, digits);
934scoped NumberBuffer number = new NumberBuffer(NumberBufferKind.Integer, numberBuffer.Slice(0, valueDigits + 1));
935BigIntegerToDecChars(Unsafe.BitCast<Span<byte>, Span<Utf8Char>>(number.Digits.Slice(0, valueDigits)), base1E9Value, valueDigits);
1092lower.Slice(0, BigIntegerCalculator.ActualLength(lower)),
1103upper.Slice(0, BigIntegerCalculator.ActualLength(upper)),
1383LeadingPowers1E9.CopyTo(pow1E9.Slice(0, LeadingPowers1E9.Length));
1386ReadOnlySpan<nuint> src = pow1E9.Slice(Indexes[5], Indexes[6] - Indexes[5]);
1396Span<nuint> dst = pow1E9.Slice(toExclusive, src.Length << 1);
1412src = pow1E9.Slice(from, toExclusive - from);
1480BigIntegerCalculator.Multiply(left, UInt32PowersOfTen[trailingZeroCount], bits.Slice(0, left.Length + 1));
1515Span<nuint> src = powersOfTen.Slice(0, curLength);
1516Span<nuint> dst = powersOfTen2.Slice(0, curLength += power.Length);
1531powersOfTen = powersOfTen.Slice(0, curLength);
1532Span<nuint> bits2 = bits.Slice(omittedLength, curLength += left.Length);
System\Numerics\BigIntegerCalculator.DivRem.cs (16)
220bits.Slice(0, sigmaDigit).Clear();
263q.Slice(0, quotientUpper.Length).CopyTo(quotientUpper);
269BurnikelZieglerD2n1n(z, b, quotientUpper.Slice(0, n), r);
275a.Slice(i * n, n).CopyTo(z);
276r.Slice(0, n).CopyTo(z.Slice(n));
277BurnikelZieglerD2n1n(z, b, quotient.Slice(i * n, n), r);
287Debug.Assert(!r.Slice(0, sigmaDigit).ContainsAnyExcept(0u));
371DivideGrammarSchool(r1, right, quotient.Slice(0, quotientLength));
381r1.Slice(0, remainder.Length).CopyTo(remainder);
408BurnikelZieglerD3n2n(r1.Slice(0, right.Length), left.Slice(0, halfN), right, quotient.Slice(0, halfN), remainder);
447d.Slice(0, n).Clear();
453left3.CopyTo(remainder.Slice(0, n));
455Span<nuint> rr = remainder.Slice(0, d.Length + 1);
464quotient.Slice(0, qi).Fill(nuint.MaxValue);
477bits = bits.Slice(0, left.Length + right.Length);
System\Numerics\BigIntegerCalculator.FastReducer.cs (7)
42_mu = mu.Slice(0, ActualLength(mu));
61int l2 = DivMul(_q1.Slice(0, l1), _modulus, _q2, _modulus.Length + 1);
64int length = SubMod(value, _q2.Slice(0, l2), _modulus, _modulus.Length + 1);
85bits = bits.Slice(0, left.Length + right.Length);
104left = left.Slice(0, k);
141left = left.Slice(0, ActualLength(left));
146left = left.Slice(0, ActualLength(left));
System\Numerics\BigIntegerCalculator.GcdInv.cs (5)
196left = left.Slice(0, Reduce(left, right));
206left = left.Slice(0, Refresh(left, count));
207right = right.Slice(0, Refresh(right, count));
243left = left.Slice(0, Overwrite(left, Gcd(x, y)));
463return ActualLength(bits.Slice(0, maxLength));
System\Numerics\BigIntegerCalculator.PowMod.cs (45)
53resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
64return result.Slice(0, resultLength);
73Multiply(left.Slice(0, leftLength), right, temp.Slice(0, resultLength));
81return ActualLength(left.Slice(0, resultLength));
91Square(value.Slice(0, valueLength), temp.Slice(0, resultLength));
99return ActualLength(value.Slice(0, resultLength));
276Remainder(value, modulus, valueCopy.Slice(0, value.Length));
316Remainder(value, modulus, valueCopy.Slice(0, value.Length));
497value.Slice(0, valueLength).CopyTo(shifted.Slice(k));
504shifted.Slice(0, k).CopyTo(value);
506valueLength = ActualLength(value.Slice(0, k));
517oneShifted.Slice(0, k).CopyTo(rModN);
529rModN.Slice(0, rModNLength).CopyTo(bits);
532bits.Slice(0, resultLength).CopyTo(originalBits);
557value.Slice(0, valueLength).CopyTo(table.Slice(0, k));
568Square(value.Slice(0, valueLength), prod.Slice(0, valueLength * 2));
570prod.Slice(0, k).CopyTo(base2);
576ReadOnlySpan<nuint> prev = table.Slice((i - 1) * k, k);
580Multiply(prev.Slice(0, prevLength), base2.Slice(0, base2Length),
581prod.Slice(0, prevLength + base2Length));
583prod.Slice(0, k).CopyTo(table.Slice(i * k, k));
592rModN.Slice(0, rModNLength).CopyTo(bits);
632ReadOnlySpan<nuint> entry = table.Slice(((wValue - 1) >> 1) * k, k);
648bits.Slice(0, resultLen).CopyTo(originalBits);
718Span<nuint> upper = value.Slice(k, k);
736return ActualLength(value.Slice(0, k));
757resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
758resultLength = Reduce(result.Slice(0, resultLength), modulus);
762valueLength = Reduce(value.Slice(0, valueLength), modulus);
785resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
786resultLength = Reduce(result.Slice(0, resultLength), modulus);
792valueLength = Reduce(value.Slice(0, valueLength), modulus);
798return result.Slice(0, resultLength);
819resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
820resultLength = reducer.Reduce(result.Slice(0, resultLength));
824valueLength = reducer.Reduce(value.Slice(0, valueLength));
847resultLength = MultiplySelf(ref result, resultLength, value.Slice(0, valueLength), ref temp);
848resultLength = reducer.Reduce(result.Slice(0, resultLength));
854valueLength = reducer.Reduce(value.Slice(0, valueLength));
860return result.Slice(0, resultLength);
System\Numerics\BigIntegerCalculator.SquMul.cs (39)
77Toom3Data p = Toom3Data.Build(value, n, pAndQAll.Slice(0, 3 * pLength));
113Span<nuint> bitsLow = bits.Slice(0, n2);
286Toom3Data p = Toom3Data.Build(left, n, pAndQAll.Slice(0, 3 * pLength));
319Span<nuint> z0 = bits.Slice(0, left0.Length + right0.Length);
333Span<nuint> p1 = pAndQAll.Slice(0, pLength);
334Span<nuint> pm1 = pAndQAll.Slice(pLength, pLength);
335Span<nuint> q1 = pAndQAll.Slice(pLength * 2, pLength);
336Span<nuint> qm1 = pAndQAll.Slice(pLength * 3, pLength);
369Span<nuint> z1 = cAll.Slice(0, cLength);
370Span<nuint> c1 = z1.Slice(0, p1.Length + q1.Length);
372Span<nuint> z2 = cAll.Slice(cLength, cLength);
373Span<nuint> cm1 = cAll.Slice(cLength * 2, pm1.Length + qm1.Length);
438Span<nuint> bitsLow = bits.Slice(0, n + n);
497Span<nuint> bitsLow = bits.Slice(0, n + right.Length);
506Span<nuint> carryOrig = bitsHigh.Slice(0, right.Length);
511Multiply(leftHigh, right, bitsHigh.Slice(0, leftHigh.Length + right.Length));
560Span<nuint> p1 = buffer.Slice(0, pLength);
561Span<nuint> pm1 = buffer.Slice(pLength, pLength);
579Span<nuint> pm2 = buffer.Slice(pLength + pLength, pLength);
639Span<nuint> r0 = bits.Slice(0, p0.Length + q0.Length);
642? bits.Slice(4 * n, pInf.Length + qInf.Length)
645Span<nuint> r1 = buffer.Slice(0, p1.Length + q1.Length);
646Span<nuint> rm1 = buffer.Slice(rLength, pm1.Length + qm1.Length);
647Span<nuint> rm2 = buffer.Slice(rLength * 2, pm2.Length + qm2.Length);
659z1: buffer.Slice(0, rLength),
661z2: buffer.Slice(rLength, rLength),
664z3: buffer.Slice(rLength * 2, rLength),
683Span<nuint> r0 = bits.Slice(0, p0.Length << 1);
684Span<nuint> rInf = bits.Slice(4 * n, pInf.Length << 1);
686Span<nuint> r1 = buffer.Slice(0, p1.Length << 1);
687Span<nuint> rm1 = buffer.Slice(rLength, pm1.Length << 1);
688Span<nuint> rm2 = buffer.Slice(rLength * 2, pm2.Length << 1);
700z1: buffer.Slice(0, rLength),
702z2: buffer.Slice(rLength, rLength),
705z3: buffer.Slice(rLength * 2, rLength),
729SubtractSelf(z3, ref z3Sign, z1.Slice(0, r1Length));
737AddSelf(z1, ref z1Sign, z2.Slice(0, rm1Length), -z2Sign);
970left = left.Slice(0, right.Length);
1014left = left.Slice(0, right.Length);
System.Security.Cryptography (149)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (10)
220buf = buf.Slice(0, byteCount);
230buf = buf.Slice(0, written);
505buf = buf.Slice(0, byteCount);
515buf = buf.Slice(0, written);
700iv = iv.Slice(0, rc2Parameters.Iv.Length);
752iv = iv.Slice(0, bytesWritten);
884Span<byte> k = dk.Slice(0, 8);
885Span<byte> iv = dk.Slice(8, 8);
1041t = t.Slice(0, tLength);
1056t.Slice(0, dk.Length).CopyTo(dk);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (12)
135Span<byte> ps = destination.Slice(2, destination.Length - source.Length - 3);
282destination.Slice(2, paddingLength).Fill(0xFF);
316Span<byte> seed = destination.Slice(1, hLen);
324Span<byte> lHash = db.Slice(0, hLen);
326Span<byte> ps = db.Slice(hLen, db.Length - hLen - 1 - mDest.Length);
327Span<byte> psEnd = db.Slice(hLen + ps.Length, 1);
410destination.Slice(0, destination.Length - emLen).Clear();
413Span<byte> em = destination.Slice(destination.Length - emLen, emLen);
417Span<byte> db = em.Slice(0, dbLen);
418Span<byte> hDest = em.Slice(dbLen, hLen);
448db.Slice(0, psLen).Clear();
624tmp.Slice(0, writePtr.Length).CopyTo(writePtr);
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System\Security\Cryptography\Aes.cs (11)
264destination = destination.Slice(0, requiredLength);
515return lease.Span.Slice(0, written).ToArray();
598destination = destination.Slice(0, maxOutput);
630lease.Span.Slice(0, written).CopyTo(destination);
824Span<byte> A = B.Slice(0, 8);
825Span<byte> ALo = A.Slice(4, 4);
837R.Slice(0, 8).CopyTo(B.Slice(8));
845B.Slice(8, 8).CopyTo(R);
859Span<byte> A = B.Slice(0, 8);
860Span<byte> ALo = A.Slice(4, 4);
877R.Slice(0, 8).CopyTo(B.Slice(8));
System\Security\Cryptography\UniversalCryptoOneShot.cs (11)
41Span<byte> transformBuffer = output.Slice(0, bytesTransformed);
88stackBuffer.Slice(0, stackTransformFinal),
91Span<byte> writtenDepadded = stackBuffer.Slice(0, depaddedLength);
139stackBuffer.Slice(0, finalTransformWritten),
142Span<byte> depaddedFinalTransform = stackBuffer.Slice(0, depaddedLength);
147CryptographicOperations.ZeroMemory(output.Slice(0, writtenToOutput));
159CryptographicOperations.ZeroMemory(output.Slice(0, writtenToOutput));
160CryptographicOperations.ZeroMemory(stackBuffer.Slice(0, finalTransformWritten));
177decryptedBuffer = buffer.Slice(0, transformWritten);
191decryptedBuffer.Slice(0, unpaddedLength).CopyTo(output);
226Span<byte> paddedOutput = output.Slice(0, padWritten);
System.Security.Cryptography.Cose (9)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (4)
383WriteCoseSignaturesArray(writer, signer, buffer.Slice(protectedMapBytesWritten), buffer.Slice(0, protectedMapBytesWritten), associatedData, content, contentStream);
455AppendToBeSigned(buffer, toBeSignedBuilder, SigStructureContext.Signature, bodyProtected, buffer.Slice(0, signProtectedBytesWritten), associatedData, content, contentStream);
784byte[] encodedSignProtected = bufferSpan.Slice(0, bytesWritten).ToArray();
794byte[] signature = bufferSpan.Slice(0, bytesWritten).ToArray();
System.Security.Cryptography.Pkcs (29)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (10)
220buf = buf.Slice(0, byteCount);
230buf = buf.Slice(0, written);
505buf = buf.Slice(0, byteCount);
515buf = buf.Slice(0, written);
700iv = iv.Slice(0, rc2Parameters.Iv.Length);
752iv = iv.Slice(0, bytesWritten);
884Span<byte> k = dk.Slice(0, 8);
885Span<byte> iv = dk.Slice(8, 8);
1041t = t.Slice(0, tLength);
1056t.Slice(0, dk.Length).CopyTo(dk);
System.Security.Cryptography.ProtectedData (1)
System.Security.Principal.Windows (2)
System.ServiceProcess.ServiceController (10)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.Encodings.Web (16)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.Json (154)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (10)
25utf8Unescaped = utf8Unescaped.Slice(0, written);
55utf8Unescaped = utf8Unescaped.Slice(0, written);
82byte[] propertyName = utf8Unescaped.Slice(0, written).ToArray();
107utf8Unescaped = utf8Unescaped.Slice(0, written);
140utf8Escaped = utf8Escaped.Slice(0, length);
145utf8Unescaped = utf8Unescaped.Slice(0, written);
182utf8Unescaped1 = utf8Unescaped1.Slice(0, written);
186utf8Unescaped2 = utf8Unescaped2.Slice(0, written);
214bytes = utf8Unescaped.Slice(0, bytesWritten).ToArray();
242bytes = byteSpan.Slice(0, bytesWritten).ToArray();
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
132propertyName = escapedPropertyName.Slice(0, written);
291utf8PropertyName = escapedPropertyName.Slice(0, written);
909WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written));
932WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written));
955WriteStringByOptions(escapedPropertyName.Slice(0, written), escapedValue);
978WriteStringByOptions(escapedPropertyName.Slice(0, written), escapedValue);
1086value = escapedValue.Slice(0, written);
1106propertyName = escapedPropertyName.Slice(0, written);
1146utf8Value = escapedValue.Slice(0, written);
1166utf8PropertyName = escapedPropertyName.Slice(0, written);
1206utf8Value = escapedValue.Slice(0, written);
1226propertyName = escapedPropertyName.Slice(0, written);
1266value = escapedValue.Slice(0, written);
1286utf8PropertyName = escapedPropertyName.Slice(0, written);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (12)
72combinedBuffer = combinedBuffer.Slice(0, ConcatInto(partialStringDataBuffer, value, combinedBuffer));
80value = combinedBuffer.Slice(0, charsConsumed);
88partialStringDataBuffer = combinedBuffer.Slice(0, charsConsumed);
94partialStringDataBuffer = combinedBuffer.Slice(0, charsConsumed);
148WriteStringSegmentData(escapedValue.Slice(0, written));
240combinedBuffer = combinedBuffer.Slice(0, ConcatInto(partialStringDataBuffer, utf8Value, combinedBuffer));
248utf8Value = combinedBuffer.Slice(0, bytesConsumed);
256partialStringDataBuffer = combinedBuffer.Slice(0, bytesConsumed);
262partialStringDataBuffer = combinedBuffer.Slice(0, bytesConsumed);
314WriteStringSegmentData(escapedValue.Slice(0, written));
407combinedBuffer = combinedBuffer.Slice(0, ConcatInto(partialStringDataBuffer, bytes, combinedBuffer));
412partialStringDataBuffer = combinedBuffer.Slice(0, 3);
System.Text.Json.SourceGeneration (9)
System.Text.RegularExpressions (28)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.RegularExpressions.Generator (30)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Threading.AccessControl (1)
System.Web.HttpUtility (15)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder.cs (10)
93string s = _chars.Slice(0, _pos).ToString();
101public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos);
102public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start);
103public ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length);
113_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
114_chars.Slice(index, count).Fill(value);
133_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
201Span<char> dst = _chars.Slice(_pos, count);
231return _chars.Slice(origPos, length);
267_chars.Slice(0, _pos).CopyTo(poolArray);
System.Windows.Forms (8)
System.Windows.Forms.Design (4)
System.Windows.Forms.Primitives (10)