394 references to CopyTo
aspire (5)
src\Shared\CircularBuffer.cs (5)
99data.Slice(0, _end).CopyTo(data.Slice(1)); 107data.Slice(internalIndex, shiftLength).CopyTo(data.Slice(internalIndex + 1)); 110data.Slice(0, _end).CopyTo(data.Slice(1)); 116data.Slice(internalIndex, _end - internalIndex).CopyTo(data.Slice(internalIndex + 1)); 120data.Slice(internalIndex, data.Length - internalIndex - 1).CopyTo(data.Slice(internalIndex + 1));
Aspire.Dashboard (6)
Otlp\Model\OtlpHelpers.cs (1)
280parentAttributes.AsSpan().CopyTo(copiedAttributes);
src\Shared\CircularBuffer.cs (5)
99data.Slice(0, _end).CopyTo(data.Slice(1)); 107data.Slice(internalIndex, shiftLength).CopyTo(data.Slice(internalIndex + 1)); 110data.Slice(0, _end).CopyTo(data.Slice(1)); 116data.Slice(internalIndex, _end - internalIndex).CopyTo(data.Slice(internalIndex + 1)); 120data.Slice(internalIndex, data.Length - internalIndex - 1).CopyTo(data.Slice(internalIndex + 1));
Aspire.Hosting (5)
src\Shared\CircularBuffer.cs (5)
99data.Slice(0, _end).CopyTo(data.Slice(1)); 107data.Slice(internalIndex, shiftLength).CopyTo(data.Slice(internalIndex + 1)); 110data.Slice(0, _end).CopyTo(data.Slice(1)); 116data.Slice(internalIndex, _end - internalIndex).CopyTo(data.Slice(internalIndex + 1)); 120data.Slice(internalIndex, data.Length - internalIndex - 1).CopyTo(data.Slice(internalIndex + 1));
illink (3)
Microsoft.AspNetCore.Components (2)
ParameterView.cs (1)
126_frames.AsSpan(1, numEntries).CopyTo(cloneBuffer.AsSpan(1));
SupplyParameterFromPersistentComponentStateValueProvider.cs (1)
213keyBuffer.CopyTo(newPool);
Microsoft.AspNetCore.Components.Forms (1)
src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
64_currentBuffer[_nextEndIndex..].CopyTo(newBuffer.AsSpan(newEndIndex));
Microsoft.AspNetCore.Components.Server (4)
src\Shared\PooledArrayBufferWriter.cs (1)
169previousBuffer.CopyTo(_rentedBuffer);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\BufferWriter.cs (1)
255_segment.AsSpan(0, _buffered).CopyTo(realSpan);
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
64_currentBuffer[_nextEndIndex..].CopyTo(newBuffer.AsSpan(newEndIndex));
Microsoft.AspNetCore.DataProtection (3)
Managed\ManagedAuthenticatedEncryptor.cs (1)
387keyModifier.CopyTo(outputSpan.Slice(start: 0, length: keyModifierLength));
SP800_108\ManagedSP800_108_CTR_HMACSHA512.cs (2)
122prfOutput.Slice(0, bytesToWrite).CopyTo(destination); 129prfOutput.Slice(bytesToWrite, leftOverBytes).CopyTo(destination);
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
92_span.CopyTo(array);
Microsoft.AspNetCore.Http.Connections (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.Http.Extensions (4)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
92_span.CopyTo(array);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (3)
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.HttpLogging (4)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
92_span.CopyTo(array);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (3)
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Rfc6238AuthenticationService.cs (1)
73input.CopyTo(combined);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
src\Shared\PooledArrayBufferWriter.cs (1)
169previousBuffer.CopyTo(_rentedBuffer);
Microsoft.AspNetCore.OpenApi (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.OutputCaching (1)
RecyclableArrayBufferWriter.cs (1)
120oldArray.AsSpan(0, _index).CopyTo(_buffer);
Microsoft.AspNetCore.Server.HttpSys (4)
src\Shared\PathNormalizer\PathNormalizer.cs (4)
35currentSrc.CopyTo(src[writtenLength..]); 42currentSrc[..nextDotSegmentIndex].CopyTo(src[writtenLength..]); 74src.Slice(readPointer, 3).CopyTo(src[writtenLength..]); 110src[readPointer..].CopyTo(src[writtenLength..]);
Microsoft.AspNetCore.Server.IIS (4)
src\Shared\PathNormalizer\PathNormalizer.cs (4)
35currentSrc.CopyTo(src[writtenLength..]); 42currentSrc[..nextDotSegmentIndex].CopyTo(src[writtenLength..]); 74src.Slice(readPointer, 3).CopyTo(src[writtenLength..]); 110src[readPointer..].CopyTo(src[writtenLength..]);
Microsoft.AspNetCore.Server.Kestrel.Core (4)
src\Shared\PathNormalizer\PathNormalizer.cs (4)
35currentSrc.CopyTo(src[writtenLength..]); 42currentSrc[..nextDotSegmentIndex].CopyTo(src[writtenLength..]); 74src.Slice(readPointer, 3).CopyTo(src[writtenLength..]); 110src[readPointer..].CopyTo(src[writtenLength..]);
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\PathNormalizer\PathNormalizer.cs (4)
35currentSrc.CopyTo(src[writtenLength..]); 42currentSrc[..nextDotSegmentIndex].CopyTo(src[writtenLength..]); 74src.Slice(readPointer, 3).CopyTo(src[writtenLength..]); 110src[readPointer..].CopyTo(src[writtenLength..]);
UrlDecoderTests.cs (1)
48input.AsSpan().CopyTo(destination);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.SignalR.Common (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MemoryBufferWriterTests.cs (1)
420data.AsSpan(0, MinimumSegmentSize / 2).CopyTo(expectedOutput.AsSpan(0, MinimumSegmentSize / 2));
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
242_currentSegment.AsSpan(0, _position).CopyTo(result.AsSpan(totalWritten)); 271_currentSegment.AsSpan(0, _position).CopyTo(span.Slice(totalWritten));
Microsoft.AspNetCore.WebSockets (4)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
92_span.CopyTo(array);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (3)
143_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 163_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 295_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.CodeAnalysis (1)
CommandLine\CommandLineParser.cs (1)
640lineBuffer.CopyTo(temp.AsSpan());
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceEmbeddingGenerator.cs (1)
145bytes.AsSpan(0, bytesWritten).CopyTo(MemoryMarshal.AsBytes(vector.AsSpan()));
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
313_lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\BufferChunk.cs (1)
65OversizedArray.AsSpan(Offset, length).CopyTo(copy);
Internal\RecyclableArrayBufferWriter.cs (1)
194oldArray.AsSpan(0, _index).CopyTo(_buffer);
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ActivatorUtilities.cs (1)
136ctorArgs.CopyTo(bestCtorArgs);
Microsoft.Extensions.Identity.Core (1)
Rfc6238AuthenticationService.cs (1)
73input.CopyTo(combined);
Microsoft.Extensions.Logging.Abstractions (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.Extensions.Telemetry (1)
Logging\JustInTimeRedactor.cs (1)
102workBuffer.Slice(0, charsInWorkBuffer).CopyTo(a);
Microsoft.ML.Core (11)
Utilities\BigArray.cs (6)
408_entries[maMax].AsSpan(miMin, length).CopyTo(dst); 414_entries[maMin].AsSpan(miMin, BlockSize - miMin).CopyTo(dst); 416_entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(BlockSize - miMin)); 425_entries[maMin].AsSpan(miMin, dstSoFar).CopyTo(dst); 430_entries[major].AsSpan(0, BlockSize).CopyTo(dst.Slice(dstSoFar)); 437_entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(dstSoFar));
Utilities\Stream.cs (1)
717rentedArray.AsSpan(0, numElementsToReadThisChunk * sizeof(T)).CopyTo(MemoryMarshal.AsBytes(destination.Slice(0, numElementsToReadThisChunk)));
Utilities\VBufferUtils.cs (4)
342editor.Indices.Slice(idx, sliceLength).CopyTo(editor.Indices.Slice(idx + 1)); 343editor.Values.Slice(idx, sliceLength).CopyTo(editor.Values.Slice(idx + 1)); 433editor.Values.Slice(lim, sliceLength).CopyTo(editor.Values.Slice(denseCount)); 434editor.Indices.Slice(lim, sliceLength).CopyTo(editor.Indices.Slice(denseCount));
Microsoft.ML.Core.Tests (1)
UnitTests\TestVBuffer.cs (1)
1148aEditor.Indices.Slice(boundary).CopyTo(bEditor.Indices);
Microsoft.ML.CpuMath (2)
AlignedArray.cs (2)
115Items.AsSpan(_base, count).CopyTo(dst.Slice(index)); 123Items.AsSpan(start + _base, count).CopyTo(dst.Slice(index));
Microsoft.ML.Data (10)
Data\BufferBuilder.cs (3)
454_values.AsSpan(0, _length).CopyTo(editor.Values); 461_values.AsSpan(0, _count).CopyTo(editor.Values); 462_indices.AsSpan(0, _count).CopyTo(editor.Indices);
DataLoadSave\Binary\Codecs.cs (3)
1097.CopyTo(editor.Values); 1108.CopyTo(editor.Values); 1110.CopyTo(editor.Indices);
DataLoadSave\Text\TextLoaderParser.cs (2)
426_values.AsSpan(0, _count).CopyTo(editor.Values); 433_indices.AsSpan(0, _count).CopyTo(editor.Indices);
Deprecated\Vector\VBufferMathUtils.cs (2)
310.CopyTo(indices.Slice(dLim + gapCount)); 312.CopyTo(values.Slice(dLim + gapCount));
Microsoft.ML.DataView (2)
VBuffer.cs (2)
210_indices.AsSpan(0, _count).CopyTo(editor.Indices); 294_values.AsSpan(0, Length).CopyTo(destination.Slice(destinationIndex));
Microsoft.ML.FastTree (16)
Utils\ToByteArrayExtensions.cs (16)
293MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 304buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 326MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 337buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 359MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 375buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 397MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 408buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 430MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 441buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 463MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 474buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 496MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 507buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan())); 529MemoryMarshal.AsBytes(a.AsSpan()).CopyTo(buffer.AsSpan(position)); 540buffer.AsSpan(position, byteLength).CopyTo(MemoryMarshal.AsBytes(a.AsSpan()));
Microsoft.ML.ImageAnalytics (1)
ImageLoader.cs (1)
346srcSpan.CopyTo(dstSpan);
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
721tensor.Buffer.Span.CopyTo(editor.Values);
Microsoft.ML.TensorFlow (1)
TensorTypeExtensions.cs (1)
48span.CopyTo(values);
Microsoft.ML.Tokenizers (21)
Model\BPETokenizer.cs (1)
1066vocabBuffer.Slice(0, completeCharsWritten).CopyTo(buffer);
Model\CodeGenTokenizer.cs (1)
1496vocabBuffer.Slice(0, completeCharsWritten).CopyTo(buffer);
Model\SentencePieceBaseModel.cs (2)
558destination.Slice(suffixIndex + 1, charsWritten - suffixIndex - 1).CopyTo(destination.Slice(suffixIndex)); 634charPoolArray.AsSpan(0, charCount).CopyTo(buffer);
Model\SentencePieceUnigramModel.cs (2)
150normalizedString.AsSpan().Slice(normalizedString.Length - normalizedStringCountFromEnd).CopyTo(utf16NormalizedString.AsSpan(utf16NormalizedString.Length - normalizedStringCountFromEnd)); 167normalizedString.AsSpan().Slice(normalizedString.Length - normalizedStringCountFromEnd).CopyTo(utf16NormalizedString.AsSpan(utf16NormalizedString.Length - normalizedStringCountFromEnd));
Model\TiktokenTokenizer.cs (3)
842utf8Bytes.CopyTo(tmp.AsSpan()); 922tempBuffer.Slice(0, incompleteCharsWritten).CopyTo(buffer); 955tempBuffer.Slice(0, charsConsumed).CopyTo(buffer);
Normalizer\BertNormalizer.cs (1)
168chars.CopyTo(buffer.AsSpan(index));
Normalizer\SentencePieceNormalizer.cs (2)
409_spaceSymbol.AsSpan().CopyTo(normalized.Slice(normalizedIndex)); 471_spaceSymbol.AsSpan().CopyTo(normalized.Slice(normalizedIndex));
Utils\BytePairEncoder.cs (1)
78byteIndicesAndRanks.Slice(j + 2).CopyTo(byteIndicesAndRanks.Slice(j + 1));
Utils\Helpers.cs (1)
35span.CopyTo(newPoolArray);
Utils\Helpers.netcoreapp.cs (1)
92buffer.Slice(0, bytesWritten).CopyTo(destination.AsSpan(bytesIndex));
Utils\ValueStringBuilder.cs (6)
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)); 237_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 257_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 407_chars.Slice(0, _pos).CopyTo(poolArray);
Microsoft.ML.Tokenizers.Tests (1)
src\Microsoft.ML.Tokenizers\Utils\Helpers.cs (1)
35span.CopyTo(newPoolArray);
Microsoft.ML.Transforms (1)
GroupTransform.cs (1)
477_buffer.AsSpan(0, _size).CopyTo(editor.Values);
Shared (1)
ServerSentEvents\SseParser_1.cs (1)
313_lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer);
System.Console (5)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\ConsolePal.Unix.cs (1)
573dst.CopyTo(tmpReadBytes);
System\IO\StdInReader.cs (1)
84chars.CopyTo(_unprocessedBufferToBeRead.AsSpan(_endIndex));
System.Diagnostics.DiagnosticSource (6)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Diagnostics\Metrics\TagList.netcore.cs (3)
195_overflowTags.AsSpan(index, _tagsCount - index).CopyTo(_overflowTags.AsSpan(index + 1)); 201tags.Slice(index, _tagsCount - index).CopyTo(tags.Slice(index + 1)); 218tags.Slice(index + 1, _tagsCount - index - 1).CopyTo(tags.Slice(index));
System.Diagnostics.Process (4)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Diagnostics\Process.Linux.cs (1)
287buffer.CopyTo(tmp);
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
203accumValueBytes.Slice(0, SemanticByteCount).CopyTo(writeSpan);
System\Formats\Asn1\AsnWriter.cs (1)
157_buffer.AsSpan(0, _offset).CopyTo(destination);
System.Formats.Cbor (3)
System\Formats\Cbor\Writer\CborWriter.Map.cs (1)
174tmpSpan.CopyTo(source.Slice(_frameOffset, totalMapPayloadEncodingLength));
System\Formats\Cbor\Writer\CborWriter.String.cs (2)
215buffer.Slice(offset, length).CopyTo(s); 223tempSpan.CopyTo(buffer.Slice(_offset, definiteLength));
System.Formats.Tar (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System.IO.Compression (2)
System\IO\Compression\DeflateManaged\OutputWindow.cs (2)
143_window.AsSpan(WindowSize - tailLen, tailLen).CopyTo(output); 146_window.AsSpan(copy_end - output.Length, output.Length).CopyTo(output);
System.IO.FileSystem.Watcher (7)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\IO\FileSystemWatcher.cs (4)
762items.AsSpan(0, index).CopyTo(newItems); 763items.AsSpan(index).CopyTo(newItems.AsSpan(index + 1)); 778items.AsSpan(0, index).CopyTo(newItems); 779items.AsSpan(index + 1).CopyTo(newItems.AsSpan(index));
System.IO.MemoryMappedFiles (1)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
268guid.Slice(0, MaxNameLength - NamePrefix.Length).CopyTo(span.Slice(NamePrefix.Length));
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
328_currentSegment.Slice(0, _countInCurrentSegment).CopyTo(destination);
System.Memory (2)
System\Text\EncodingExtensions.cs (2)
204array.AsSpan(0, length).CopyTo(remainingBytes); 390array.AsSpan(0, length).CopyTo(span);
System.Net.Http (9)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (3)
203_blocks.AsSpan((int)unusedInitialBlocks, (int)usedBlocks).CopyTo(newBlockArray); 209_blocks.AsSpan((int)unusedInitialBlocks, (int)usedBlocks).CopyTo(_blocks); 396block.Span.CopyTo(destination);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Net\Http\HttpContent.cs (1)
1065_lastBuffer.AsSpan(0, _lastBufferOffset).CopyTo(destination);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
1171_recvBuffer.ActiveSpan.Slice(0, copyLen).CopyTo(buffer); 1243_recvBuffer.ActiveSpan.Slice(0, copyLen).CopyTo(buffer.Span);
System.Net.Mail (4)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Net\BufferedReadStream.cs (1)
37_storedBuffer.AsSpan(_storedOffset, read).CopyTo(buffer);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
465new Span<byte>(&ipHeader, sizeof(IpHeader)).CopyTo(result);
System.Net.Primitives (2)
System\Net\IPAddress.cs (1)
375MemoryMarshal.AsBytes<ushort>(numbers).CopyTo(destination);
System\Net\IPAddressParser.cs (1)
233used.CopyTo(destination.Slice(pos));
System.Net.Quic (6)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (3)
203_blocks.AsSpan((int)unusedInitialBlocks, (int)usedBlocks).CopyTo(newBlockArray); 209_blocks.AsSpan((int)unusedInitialBlocks, (int)usedBlocks).CopyTo(_blocks); 396block.Span.CopyTo(destination);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (2)
104certificateBuffer->Span.CopyTo(certData.Span); 111chainBuffer->Span.CopyTo(chainData.Span);
System\Net\Quic\QuicStream.Stream.cs (1)
127rentedBuffer.AsSpan(0, readLength).CopyTo(buffer);
System.Net.Security (3)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
411clientChallenge.CopyTo(MemoryMarshal.CreateSpan(ref temp.ClientChallenge[0], ChallengeLength));
System\Net\Security\SslStream.IO.cs (1)
877_buffer.DecryptedSpan.CopyTo(extraBuffer);
System\Net\Security\SslStream.Protocol.cs (1)
1389oldPayload.AsSpan<byte>().CopyTo(Payload);
System.Net.ServerSentEvents (1)
System\Net\ServerSentEvents\SseParser_1.cs (1)
297_lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer);
System.Net.Sockets (2)
System\Net\Sockets\Socket.cs (2)
332buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span); 378buffer.Slice(0, size).CopyTo(socketAddress.Buffer.Span);
System.Net.WebSockets (6)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
68_buffer.AsSpan(0, position).CopyTo(newBuffer);
System\Net\WebSockets\Compression\WebSocketInflater.cs (2)
76_buffer.AsSpan(_position, _available).CopyTo(_buffer); 109_buffer.AsSpan(0, _available).CopyTo(newBuffer);
System\Net\WebSockets\ManagedWebSocket.cs (2)
931_receiveBuffer.Span.Slice(_receiveBufferOffset, receiveBufferBytesToCopy).CopyTo( 1595_receiveBuffer.Span.Slice(_receiveBufferOffset, _receiveBufferCount).CopyTo(_receiveBuffer.Span);
System\Net\WebSockets\WebSocket.cs (1)
47new Span<byte>(array, 0, r.Count).CopyTo(buffer.Span);
System.Private.CoreLib (36)
src\libraries\Common\src\System\Number.Formatting.Common.cs (1)
505thousandsSepPos.CopyTo(newThousandsSepPos);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (2)
524dataRefObj.CopyTo(newDataRefObj); 528refObjPosition.CopyTo(newRefObjPosition);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1478buffer.CopyTo(tmp);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (2)
361new Span<byte>(_buffer, _position, n).CopyTo(buffer); 574_buffer.AsSpan(_origin, count).CopyTo(copy);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (4)
330_buffer.AsSpan(_readPos, buffer.Length).CopyTo(buffer.Span); 374new Span<byte>(_buffer!, _readPos, n).CopyTo(destination.Span); 411_buffer.AsSpan(_readPos, bytesFromBuffer).CopyTo(buffer.Span); 448_buffer.AsSpan(0, bytesFromBuffer).CopyTo(buffer.Span);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (4)
391new Span<char>(_charBuffer, _charPos, n).CopyTo(buffer.Slice(charsRead)); 965arrayPoolBuffer.AsSpan(0, arrayPoolBufferPos).CopyTo(newBuffer); 969charBuffer.AsSpan(charPos, charLen - charPos).CopyTo(arrayPoolBuffer.AsSpan(arrayPoolBufferPos)); 1239new Span<char>(_charBuffer, _charPos, n).CopyTo(buffer.Span.Slice(charsRead));
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (2)
107new Span<char>(array, 0, numRead).CopyTo(buffer); 157new Span<char>(array, 0, numRead).CopyTo(buffer);
src\libraries\System.Private.CoreLib\src\System\Memory.cs (1)
362public void CopyTo(Memory<T> destination) => Span.CopyTo(destination.Span);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (1)
6383_destination.Slice(startingPos, charsWritten).CopyTo(_destination.Slice(startingPos + paddingNeeded));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (2)
573_chars.Slice(startingPos, charsWritten).CopyTo(_chars.Slice(startingPos + paddingNeeded)); 646_chars.Slice(0, _pos).CopyTo(newArray);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
231new Span<T>(source, startIndex, length).CopyTo(new Span<T>((void*)destination, length)); 284new Span<T>((void*)source, length).CopyTo(new Span<T>(destination, startIndex, length));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
87existingBucket.AsSpan().CopyTo(newBucket);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (4)
194span.Slice(index, _decryptedLength - index).CopyTo(span.Slice(index + 1)); 239span.Slice(index + 1, _decryptedLength - (index + 1)).CopyTo(span.Slice(index)); 323span.Slice(0, length).CopyTo(new Span<char>((void*)ptr, length)); 380span.CopyTo(resultSpan);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (2)
354_readBuffer.AsSpan(_readBufferOffset, bytesToReturn).CopyTo(buffer); 433_readBuffer.AsSpan(_readBufferOffset, bytesToReturn).CopyTo(buffer.Span);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (1)
791_destination.Slice(startingPos, bytesWritten).CopyTo(_destination.Slice(startingPos + paddingNeeded));
src\System\Text\StringBuilder.CoreCLR.cs (1)
36new Span<char>(newBuffer, newLength).CopyTo(m_ChunkChars);
System.Private.CoreLib.Generators (2)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\Json\JsonEncodingStreamWrapper.cs (1)
212_bytes.AsSpan(_byteOffset, count).CopyTo(buffer);
System\Xml\EncodingStreamWrapper.cs (1)
620_bytes.AsSpan(_byteOffset, count).CopyTo(buffer);
System\Xml\XmlBufferReader.cs (1)
497.CopyTo(dst);
System.Private.Uri (7)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Uri.cs (4)
4610span.Slice(lastSlash).CopyTo(span.Slice(i + 1)); 4638span.Slice(lastSlash + 1).CopyTo(span.Slice(i + 1)); 4653span.Slice(lastSlash).CopyTo(span); 4663span.Slice(dotCount).CopyTo(span);
System.Private.Windows.Core (14)
System\BufferScope.cs (1)
92_span.CopyTo(newArray);
System\Text\ValueStringBuilder.cs (3)
163_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]); 183_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]); 338_chars[.._pos].CopyTo(poolArray);
Windows\Win32\System\Variant\VARIANT.cs (10)
285.CopyTo(GetSpan<sbyte>(array)); 289.CopyTo(GetSpan<byte>(array)); 293.CopyTo(GetSpan<short>(array)); 297.CopyTo(GetSpan<ushort>(array)); 302.CopyTo(GetSpan<int>(array)); 308.CopyTo(GetSpan<uint>(array)); 312.CopyTo(GetSpan<long>(array)); 316.CopyTo(GetSpan<ulong>(array)); 320.CopyTo(GetSpan<float>(array)); 324.CopyTo(GetSpan<double>(array));
System.Private.Xml (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System.Reflection.Metadata (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System.Runtime.Numerics (21)
src\libraries\Common\src\System\Number.Formatting.Common.cs (1)
505thousandsSepPos.CopyTo(newThousandsSepPos);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
System\Numerics\BigIntegerCalculator.DivRem.cs (8)
181left.CopyTo(leftCopy); 446a.Slice((t - 2) * n).CopyTo(z); 460q.Slice(0, quotientUpper.Length).CopyTo(quotientUpper); 473a.Slice(i * n, n).CopyTo(z); 474r.Slice(0, n).CopyTo(z.Slice(n)); 510rt.CopyTo(remainder); 579r1.CopyTo(remainder); 584r1.Slice(0, remainder.Length).CopyTo(remainder);
System\Numerics\BigIntegerCalculator.GcdInv.cs (1)
200left.CopyTo(result);
System\Numerics\BigIntegerCalculator.PowMod.cs (5)
39result.CopyTo(bits); 319result.CopyTo(bits); 357result.CopyTo(bits); 379result.CopyTo(bits); 417result.CopyTo(bits);
System\Numerics\BigIntegerCalculator.SquMul.cs (1)
230carryOrig.CopyTo(carry);
System.Security.Cryptography (35)
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (1)
225p.Slice(0, len).CopyTo(retSpan);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
437lastBlock.AsSpan().CopyTo(destination.AsSpan(written)); 951rentedDestination.AsSpan(0, writeOffset).CopyTo(destination); 958tmpEndSpan.CopyTo(destination.Slice(writeOffset)); 1014t.Slice(0, dk.Length).CopyTo(dk);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
202hashBuf.Slice(0, destination.Length).CopyTo(destination); 206hashBuf.CopyTo(destination);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (1)
145tmp.Slice(0, written).CopyTo(destination);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (2)
450salt.CopyTo(db.Slice(psLen + 1)); 624tmp.Slice(0, writePtr.Length).CopyTo(writePtr);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
651earlyBuf.Slice(0, read).CopyTo(rented);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
761array.AsSpan().CopyTo(next); 859decrypted.AsSpan().CopyTo(_keyDecryptBuffer.AsSpan(_keyDecryptBufferOffset));
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System\Security\Cryptography\Base64Transforms.cs (3)
168transformBuffer.CopyTo(_inputBuffer); 239_inputBuffer.AsSpan(0, index).CopyTo(transformBuffer); 301transformBuffer.Slice(transformBuffer.Length - _inputIndex).CopyTo(_inputBuffer);
System\Security\Cryptography\CryptoStream.cs (2)
321_outputBuffer.AsSpan(bytesToCopy).CopyTo(_outputBuffer); 392tempOutputBuffer.AsSpan(0, numOutputBytes).CopyTo(buffer.Span);
System\Security\Cryptography\HKDFManagedImplementation.cs (1)
72lastChunk.Slice(0, remainingOutput.Length).CopyTo(remainingOutput);
System\Security\Cryptography\OpenSslCipherLite.cs (2)
75rented.AsSpan(0, written).CopyTo(output); 113tmpSpan.Slice(0, written).CopyTo(output);
System\Security\Cryptography\RandomNumberGeneratorImplementation.cs (2)
84remainder.CopyTo(data.Slice(first0Byte)); 89remainder.Slice(0, next0Byte).CopyTo(data.Slice(first0Byte));
System\Security\Cryptography\Rfc2898DeriveBytes.cs (2)
151value.AsSpan().CopyTo(_salt); 302uiSpan.CopyTo(_buffer);
System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (1)
69hmacBuffer.Slice(0, destination.Length).CopyTo(destination);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (2)
98_heldoverCipher.AsSpan().CopyTo(ciphertext); 117decryptedBytes.Slice(0, unpaddedLength).CopyTo(outputBuffer);
System\Security\Cryptography\UniversalCryptoOneShot.cs (3)
100writtenDepadded.CopyTo(output); 152depaddedFinalTransform.CopyTo(output.Slice(writtenToOutput)); 191decryptedBuffer.Slice(0, unpaddedLength).CopyTo(output);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
1392toReturn.AsSpan().CopyTo(_errors);
System.Security.Cryptography.Pkcs (8)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
437lastBlock.AsSpan().CopyTo(destination.AsSpan(written)); 951rentedDestination.AsSpan(0, writeOffset).CopyTo(destination); 958tmpEndSpan.CopyTo(destination.Slice(writeOffset)); 1014t.Slice(0, dk.Length).CopyTo(dk);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
202hashBuf.Slice(0, destination.Length).CopyTo(destination); 206hashBuf.CopyTo(destination);
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (1)
159_encodedBytes.AsSpan().CopyTo(destination);
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (1)
221_encodedBytes.AsSpan().CopyTo(destination);
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
395interopSpan.CopyTo(outputSpan);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\Connection.cs (1)
248memBuffer.Slice(0, bytesRead).Span.CopyTo(buffer);
System.Text.Encodings.Web (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System.Text.Json (7)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (1)
158destination.CopyTo(newBuffer);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
382_data.AsSpan(startIndex, length).CopyTo(newDatabase);
System\Text\Json\Writer\JsonWriterHelper.Date.cs (2)
21tempSpan.Slice(0, bytesWritten).CopyTo(buffer); 30tempSpan.Slice(0, bytesWritten).CopyTo(buffer);
System.Text.Json.SourceGeneration (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (1)
158destination.CopyTo(newBuffer);
System.Text.RegularExpressions (5)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
System.Text.RegularExpressions.Generator (5)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (2)
101_span.Slice(0, _pos).CopyTo(_span.Slice(source.Length)); 214_span.CopyTo(array);
System.Web.HttpUtility (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
142_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 162_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count)); 296_chars.Slice(0, _pos).CopyTo(poolArray);
System.Windows.Forms (3)
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (3)
77MemoryMarshal.Cast<COLORREF, int>(_customColors).CopyTo(result); 87MemoryMarshal.Cast<int, COLORREF>(value)[..Math.Min(customColors.Length, value.Length)].CopyTo(customColors); 190customColors.CopyTo(_customColors);
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (1)
1505public override void CopyTo(T[] array, int index) => _entries.AsSpan(0, _count).CopyTo(array.AsSpan(index));