377 references to Span
GenerateDocumentationAndConfigFiles (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
ILCompiler.Compiler (3)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
677DwarfHelper.WritePaddedULEB128(new Span<byte>((byte*)location, WASM_PADDED_RELOC_SIZE_32), checked((ulong)value)); 683DwarfHelper.WritePaddedSLEB128(new Span<byte>((byte*)location, WASM_PADDED_RELOC_SIZE_32), value);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
982stream.Write(new Span<byte>(data, Relocation.GetSize(reloc.Type)));
ILCompiler.ReadyToRun (9)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
677DwarfHelper.WritePaddedULEB128(new Span<byte>((byte*)location, WASM_PADDED_RELOC_SIZE_32), checked((ulong)value)); 683DwarfHelper.WritePaddedSLEB128(new Span<byte>((byte*)location, WASM_PADDED_RELOC_SIZE_32), value);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
982stream.Write(new Span<byte>(data, Relocation.GetSize(reloc.Type)));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmObjectWriter.cs (1)
1018sectionStream.Write(new Span<byte>(pData, Relocation.GetSize(reloc.Type)));
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (5)
2168str.AsSpan(startIndex, Math.Min(size, result)).CopyTo(new Span<char>(buffer, size)); 2185OperationStatus status = Utf8.FromUtf16(utf16, new Span<byte>(buffer, checked((int)(bufferSize - 1))), out _, out written); 2622new Span<byte>(gcPtrs, (int)((size + PointerSize - 1) / PointerSize)).Clear(); 4249Span<AllocMemChunk> chunks = new Span<AllocMemChunk>(args.chunks, checked((int)args.chunksCount)); 5103rvaData.Slice(valueOffset, bufferSize).CopyTo(new Span<byte>(buffer, bufferSize));
ILCompiler.RyuJit (12)
JitInterface\CorInfoImpl.RyuJit.cs (7)
2377new Span<byte>(buffer, targetPtrSize).Clear(); 2393bytes.AsSpan(valueOffset, bufferSize).CopyTo(new Span<byte>(buffer, bufferSize)); 2403new Span<byte>(&handle, targetPtrSize).CopyTo(new Span<byte>(buffer, targetPtrSize)); 2416new Span<byte>(buffer, bufferSize).Clear(); 2441new Span<byte>((byte*)pStr + offset, bufferSize).CopyTo( 2442new Span<byte>(buffer, bufferSize));
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (5)
2168str.AsSpan(startIndex, Math.Min(size, result)).CopyTo(new Span<char>(buffer, size)); 2185OperationStatus status = Utf8.FromUtf16(utf16, new Span<byte>(buffer, checked((int)(bufferSize - 1))), out _, out written); 2622new Span<byte>(gcPtrs, (int)((size + PointerSize - 1) / PointerSize)).Clear(); 4249Span<AllocMemChunk> chunks = new Span<AllocMemChunk>(args.chunks, checked((int)args.chunksCount)); 5103rvaData.Slice(valueOffset, bufferSize).CopyTo(new Span<byte>(buffer, bufferSize));
libmscordaccore_universal (3)
Entrypoints.cs (3)
77context.CopyTo(new Span<byte>(alignedBuffer, context.Length)); 446context.CopyTo(new Span<byte>(alignedBuffer, context.Length)); 551context.CopyTo(new Span<byte>(alignedBuffer, context.Length));
Microsoft.AspNetCore.Components.Server (1)
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequenceReaderExtensions.cs (1)
76Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingBasedDataProtector.cs (1)
304var span = new Span<byte>(ptr, sizeof(Guid));
Microsoft.AspNetCore.Http.Connections.Common (1)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
124_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.OpenApi (1)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
124_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.Razor.Utilities.Shared (9)
Utilities\Hashing\XxHashShared.cs (9)
121Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 172DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 259source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 274source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 313source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 326source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 330Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 389new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 390new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.AspNetCore.Server.HttpSys (10)
_generated\82\Windows.Win32.PSTR.g.cs (1)
63 internal Span<byte> AsSpan() => this.Value is null ? default(Span<byte>) : new Span<byte>(this.Value, this.Length);
_generated\83\Windows.Win32.PWSTR.g.cs (1)
63 internal Span<char> AsSpan() => this.Value is null ? default(Span<char>) : new Span<char>(this.Value, this.Length);
RequestProcessing\Response.cs (3)
557unknownHeaders = new Span<HTTP_UNKNOWN_HEADER>(unknownAlloc, numUnknownHeaders); 588knownHeaderInfo = new Span<HTTP_RESPONSE_INFO>(responseAlloc, numKnownMultiHeaders); 602var nativeHeaderValues = new Span<HTTP_KNOWN_HEADER>(headerAlloc, headerValues.Count);
src\aspnetcore\src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (3)
73return new Span<T>(AllocAsPointer<T>(count), count); 128return new Span<byte>(Alloc(sizeHint), sizeHint); 138return new Span<byte>(_currentBlock, _currentBlockCount);
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
287return new Span<byte>(NativeRequest->pRawUrl, NativeRequest->RawUrlLength); 920return new Span<T>(_pointer, _length);
Microsoft.AspNetCore.Server.IIS (7)
_generated\43\Windows.Win32.PSTR.g.cs (1)
63 internal Span<byte> AsSpan() => this.Value is null ? default(Span<byte>) : new Span<byte>(this.Value, this.Length);
_generated\44\Windows.Win32.PWSTR.g.cs (1)
63 internal Span<char> AsSpan() => this.Value is null ? default(Span<char>) : new Span<char>(this.Value, this.Length);
src\aspnetcore\src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (3)
73return new Span<T>(AllocAsPointer<T>(count), count); 128return new Span<byte>(Alloc(sizeHint), sizeHint); 138return new Span<byte>(_currentBlock, _currentBlockCount);
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
287return new Span<byte>(NativeRequest->pRawUrl, NativeRequest->RawUrlLength); 920return new Span<T>(_pointer, _length);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
src\aspnetcore\src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (3)
73return new Span<T>(AllocAsPointer<T>(count), count); 128return new Span<byte>(Alloc(sizeHint), sizeHint); 138return new Span<byte>(_currentBlock, _currentBlockCount);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
src\aspnetcore\src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (3)
73return new Span<T>(AllocAsPointer<T>(count), count); 128return new Span<byte>(Alloc(sizeHint), sizeHint); 138return new Span<byte>(_currentBlock, _currentBlockCount);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
src\aspnetcore\src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (3)
73return new Span<T>(AllocAsPointer<T>(count), count); 128return new Span<byte>(Alloc(sizeHint), sizeHint); 138return new Span<byte>(_currentBlock, _currentBlockCount);
Microsoft.AspNetCore.SignalR.Common (1)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
124_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
124_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
124_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.CodeAnalysis (9)
Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.Analyzers (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.CodeStyle (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CodeAnalysis.Workspaces (10)
Serialization\SerializerService_Reference.cs (1)
494var unmanagedSpan = new Span<byte>((void*)unmanagedMemory, length);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.CSharp (2)
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\ComEventsSink.cs (2)
164var vars = new Span<ComVariant>(pDispParams.rgvarg.ToPointer(), totalCount); 165var namedArgs = new Span<int>(pDispParams.rgdispidNamedArgs.ToPointer(), totalCount);
Microsoft.Diagnostics.DataContractReader (1)
ContractDescriptorTarget.cs (1)
998=> readFromTarget(address, new Span<byte>(buffer, checked((int)bytesToRead)));
Microsoft.Diagnostics.DataContractReader.Legacy (23)
ClrDataValue.cs (1)
191Span<byte> memBytes = new(dst, (int)loc.Size);
Dbi\DacDbiImpl.cs (14)
474blob.AsSpan().CopyTo(new Span<byte>(pBuffer, blobLength)); 492Debug.Assert(new Span<byte>(pBuffer, blobLength).SequenceEqual(bufferLocal.AsSpan(0, blobLength)), "cDAC and DAC read-write metadata buffers differ."); 955contextBuffer.AsSpan().CopyTo(new Span<byte>((void*)pOriginalContext, (int)cbSizeContext)); 1691byte[] contextBuf = new Span<byte>(pContext, (int)contextSize).ToArray(); 1746seedContext.AsSpan().CopyTo(new Span<byte>(pInternalContextBuffer, seedContext.Length)); 1764new Span<byte>(pLocal, (int)contextSize).Clear(); 1840context.AsSpan().CopyTo(new Span<byte>(pContext, context.Length)); 1857new Span<byte>(pLocal, (int)contextSize).Clear(); 1966ctx.FillFromBuffer(new Span<byte>(pContext, (int)ctx.Size)); 2067new Span<byte>(pLegacyCtx, (int)contextSize).Clear(); 2147context.AsSpan().CopyTo(new Span<byte>((byte*)ctxPtr, context.Length)); 2514givenCtx.FillFromBuffer(new Span<byte>(pContext, leafContext.Length)); 2546context.AsSpan().CopyTo(new Span<byte>(pContextBuffer, context.Length)); 2566contextStruct.FillFromBuffer(new Span<byte>(pContextBuffer, (int)contextSize));
MetaDataImportImpl.cs (1)
1432new ReadOnlySpan<char>(dataPtr, copyChars).CopyTo(new Span<char>(szString, copyChars));
OutputBufferHelpers.cs (2)
25Span<char> target = new Span<char>(stringBuf, checked((int)bufferSize)); 43Span<byte> target = new Span<byte>(stringBuf, checked(maxBytes));
SOSDacImpl.cs (3)
731var dest = new Span<byte>(pGenericModeBlock, buckets.Length); 757Debug.Assert(new ReadOnlySpan<byte>(genericModeBlockLocal, 0, sizeOfGenericModeBlock).SequenceEqual(new Span<byte>(pGenericModeBlock, sizeOfGenericModeBlock))); 2212context.FillFromBuffer(new Span<byte>(ctx, (int)context.Size));
SOSDacImpl.IXCLRDataProcess.cs (1)
71Span<byte> destination = new(buffer + ((nint)i * entrySize), entrySize);
StressTestApi\CdacStressApi.cs (1)
105blob.AsSpan().CopyTo(new Span<byte>(dest, (int)req.BlobBufferLen));
Microsoft.ML.ImageAnalytics (1)
MLImage.cs (1)
108imagePixelData.CopyTo(new Span<byte>(image.GetPixels().ToPointer(), image.Width * image.Height * 4));
Microsoft.ML.TensorFlow (1)
TensorTypeExtensions.cs (1)
47var span = new Span<T>(src, len);
Microsoft.ML.Tokenizers (1)
Normalizer\SentencePieceNormalizer.cs (1)
610trieBlob = new Span<DoubleArrayUnit>((DoubleArrayUnit*)pBlob, (int)trieBlobSize / 4).ToArray();
Microsoft.Private.Windows.Core (14)
_generated\210\Windows.Win32.PSTR.g.cs (1)
63 internal Span<byte> AsSpan() => this.Value is null ? default(Span<byte>) : new Span<byte>(this.Value, this.Length);
_generated\211\Windows.Win32.PWSTR.g.cs (1)
63 internal Span<char> AsSpan() => this.Value is null ? default(Span<char>) : new Span<char>(this.Value, this.Length);
_generated\214\Windows.Win32.RECT.InlineArrays.g.cs (1)
46 Span<winmdroot.Foundation.RECT> target = new Span<winmdroot.Foundation.RECT>(&result._0, SpanLength);
Framework\Windows\Win32\__char_32.cs (1)
13return new(p, SpanLength);
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\StringExtensions.cs (3)
49Span<char> resultSpan = new(firstChar, result.Length); 69Span<char> resultSpan = new(firstChar, result.Length); 103Span<char> resultSpan = new(firstChar, result.Length);
System\IO\BinaryReaderExtensions.cs (1)
122Span<byte> arrayData = new(a, array.Length * sizeof(T));
System\IO\StreamExtensions.cs (1)
62Span<byte> span = new(buffer, size);
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (1)
359Span<char> fileBuffer = new(
Windows\Win32\Foundation\GlobalBuffer.cs (1)
42_buffer = new((byte*)_pointer, (int)length);
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (1)
25_bufferScope = new BufferScope<ARGB>(new Span<ARGB>(s, StackSpace), length);
Windows\Win32\Graphics\Gdi\RGNDATAHEADER.cs (1)
16return new Span<RECT>((byte*)regionData + regionData->dwSize, (int)regionData->nCount).ToArray();
Windows\Win32\System\Com\ComManagedStream.cs (1)
124Span<byte> buffer = new(pv, checked((int)cb));
PresentationCore (1)
System\Windows\Media\StreamAsIStream.cs (1)
536var span = new Span<byte>(buffer.ToPointer(), (int) cb);
Roslyn.Diagnostics.Analyzers (9)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (9)
122Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 173DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 260source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 275source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 314source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 327source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 331Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 390new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 391new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
sdk-tasks (2)
ReplaceFilesWithSymbolicLinks.cs (2)
106Span<byte> span1 = new Span<byte>(ptr1, checked((int)accessor1.SafeMemoryMappedViewHandle.ByteLength)); 109Span<byte> span2 = new Span<byte>(ptr2, checked((int)accessor2.SafeMemoryMappedViewHandle.ByteLength));
System.Data.OleDb (2)
SafeHandles.cs (2)
279var dstSpan = new System.Span<byte>(dst.ToPointer(), count); 280var srcSpan = new System.Span<byte>(src.ToPointer(), count);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Activity.cs (1)
2125ActivityTraceId.SetToRandomBytes(new Span<byte>(&id, sizeof(ulong)));
System.Diagnostics.Process (5)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.ForkAndExecProcess.cs (4)
134Span<nint> pointers = new Span<nint>(block, count + 1); 135Span<byte> data = new Span<byte>(dataPtr, dataByteLength); 177Span<nint> pointers = new Span<nint>(block, count + 1); 178Span<byte> data = new Span<byte>(dataPtr, dataByteLength);
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\SpanOfCharAsUtf8StringMarshaller.cs (1)
47buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
System.Drawing.Common (6)
System\Drawing\BufferedGraphicsContext.cs (1)
269Span<RGBQUAD> rgbQuads = new((RGBQUAD*)&bitmapInfo->bmiColors, colorCount);
System\Drawing\Imaging\ColorMatrix.cs (1)
344newColorMatrix.CopyTo(new Span<float>(f, 25));
System\Drawing\Imaging\EncoderParameter.cs (2)
312new ReadOnlySpan<byte>((void*)Value, bytes).CopyTo(new Span<byte>((void*)_parameterValue, bytes)); 338new ReadOnlySpan<byte>((void*)value, bytes).CopyTo(new Span<byte>((void*)_parameterValue, bytes));
System\Drawing\Imaging\PropertyItem.cs (1)
47Value = new Span<byte>(native->value, (int)native->length).ToArray()
System\Drawing\Printing\PrinterSettings.cs (1)
740Span<char> names = new((char*)devnames, sizeInChars);
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (2)
79new Span<byte>(bytes, byteCount), 114new Span<char>(chars, charCount),
System.Formats.Cbor (1)
src\runtime\src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
System.IO.Hashing (9)
System\IO\Hashing\XxHashShared.cs (9)
118Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 169DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 252source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 267source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 306source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 319source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 323Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 382new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 383new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
System.Memory (1)
System\Buffers\SequenceReaderExtensions.Binary.cs (1)
43Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
System.Net.Http.WinHttpHandler (1)
src\runtime\src\libraries\Common\src\Interop\Windows\WinHttp\Interop.winhttp.cs (1)
71Span<char> buffer = new(value, length);
System.Net.NameResolution (2)
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
15ipAddress.TryWriteBytes(new Span<byte>(nativeIPAddress.Address, Interop.Sys.IPv6AddressBytes), out int bytesWritten);
System\Net\NameResolutionPal.Unix.cs (1)
175addr.TryWriteBytes(new Span<byte>(rawAddress, rawAddressLength), out int bytesWritten);
System.Net.Ping (2)
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\SpanOfCharAsUtf8StringMarshaller.cs (1)
47buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
462new Span<byte>(&ipHeader, sizeof(IpHeader)).CopyTo(result);
System.Net.Quic (8)
System\Net\Quic\Internal\MsQuicHelpers.cs (1)
41Span<byte> addressBytes = new Span<byte>(quicAddress, SocketAddressPal.IPv6AddressSize);
System\Net\Quic\Internal\MsQuicTlsSecret.cs (5)
59? new Span<byte>(_tlsSecrets->ClientHandshakeTrafficSecret, _tlsSecrets->SecretLength) 63? new Span<byte>(_tlsSecrets->ServerHandshakeTrafficSecret, _tlsSecrets->SecretLength) 67? new Span<byte>(_tlsSecrets->ClientTrafficSecret0, _tlsSecrets->SecretLength) 71? new Span<byte>(_tlsSecrets->ServerTrafficSecret0, _tlsSecrets->SecretLength) 75? new Span<byte>(_tlsSecrets->ClientEarlyTrafficSecret, _tlsSecrets->SecretLength)
System\Net\Quic\Interop\msquic.cs (1)
23public readonly Span<byte> Span => new(Buffer, (int)Length);
System\Net\Quic\QuicConnection.cs (1)
625_negotiatedApplicationProtocol = new SslApplicationProtocol(new Span<byte>(data.NegotiatedAlpn, data.NegotiatedAlpnLength).ToArray());
System.Net.Security (4)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
1231var clientList = new Span<byte>(inp, (int)inlen);
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
500md5.AppendData(new Span<byte>((void*)cbtData, cbtDataSize));
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (1)
41cbtPrefix.CopyTo(new Span<byte>((byte*)cbtPrefixPtr, cbtPrefix.Length));
System\Net\Security\SslStream.cs (1)
995return new Span<byte>(_pointer, _length);
System.Net.Sockets (6)
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
15ipAddress.TryWriteBytes(new Span<byte>(nativeIPAddress.Address, Interop.Sys.IPv6AddressBytes), out int bytesWritten);
System\Net\Sockets\NetworkStream.cs (1)
278return Read(new Span<byte>(&b, 1)) == 0 ? -1 : b;
System\Net\Sockets\SocketAsyncContext.Unix.cs (2)
547bool completed = SocketPal.TryCompleteReceiveFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress.Span, out int socketAddressLen, out BytesTransferred, out ReceivedFlags, out ErrorCode); 604bool completed = SocketPal.TryCompleteReceiveMessageFrom(context._socket, new Span<byte>(BufferPtr, Length), null, Flags, SocketAddress!, out int socketAddressLen, IsIPv4, IsIPv6, out BytesTransferred, out ReceivedFlags, out IPPacketInformation, out ErrorCode);
System\Net\Sockets\SocketPal.Unix.cs (2)
792received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), out errno); 860received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), socketAddress, out receivedSocketAddressLength, out receivedFlags, out errno);
System.Private.CoreLib (59)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
71Span<char> native = new Span<char>((char*)buffer, length);
src\runtime\src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
39public NumberBuffer(NumberBufferKind kind, byte* digits, int digitsLength) : this(kind, new Span<byte>(digits, digitsLength))
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\SpanOfCharAsUtf8StringMarshaller.cs (1)
47buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
121Span<EventPipeProviderConfigurationNative> providersNative = new Span<EventPipeProviderConfigurationNative>((void*)Marshal.AllocCoTaskMem(sizeof(EventPipeProviderConfigurationNative) * providers.Length), providers.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
431s.AsSpan(0, i).CopyTo(new Span<char>(pResult, result.Length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
281decimalSeparator.CopyTo(new Span<TChar>(p, decimalSeparator.Length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (14)
528var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 556var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1159var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1218var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1273var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1330var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1389var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1450var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1505var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1562var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1623var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1684var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1741var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1798var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
879Span<InternalComInterfaceDispatch> dispatches = new Span<InternalComInterfaceDispatch>(pDispatches, numSections);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (7)
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)); 1059s.CopyTo(new Span<char>((char*)ptr, s.Length)); 1077int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb)); 1100s.CopyTo(new Span<char>((char*)ptr, s.Length)); 1118int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb)); 1331s.CopyTo(new Span<char>((char*)bstr, s.Length)); // AllocBSTR already included the null terminator
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (1)
40int convertedBytes = Encoding.UTF8.GetBytes(s, new Span<byte>(buffer, bufferLength));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (2)
29Span<byte> buffer = new(mem, exactByteCount); 86buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (2)
66return new Span<TUnmanagedElement>(unmanaged, numElements); 161_span = new Span<TUnmanagedElement>(_allocatedMemory, array.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\BStrStringMarshaller.cs (1)
100managed.CopyTo(new Span<char>(ptrToFirstChar, managed.Length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
84public Span<T> AsSpan() => new(_data, _numElements);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (2)
67return new Span<TUnmanagedElement>(unmanaged, numElements); 162_span = new Span<TUnmanagedElement>(_allocatedMemory, array.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (2)
77return new Span<TUnmanagedElement>(unmanaged, numElements); 128_span = new Span<TUnmanagedElement>(_allocatedMemory, managed.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (2)
71return new Span<TUnmanagedElement>(unmanaged, numElements); 160_span = new Span<TUnmanagedElement>(_allocatedMemory, managed.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (2)
30Span<byte> buffer = new(mem, exactByteCount); 90buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (7)
291return new Span<char>((byte*)buffer.DangerousGetHandle(), (int)(buffer.ByteLength / 2)); 324span.Slice(0, length).CopyTo(new Span<char>((void*)ptr, length)); 335new Span<char>((void*)ptr, length).Clear(); 380Span<char> resultSpan = new Span<char>((void*)ptr, byteLength / sizeof(char)); 386Marshal.GetAnsiStringBytes(span, new Span<byte>((void*)ptr, byteLength)); 398new Span<byte>((void*)ptr, byteLength).Clear(); 467new Span<byte>((void*)handle, _byteLength).Clear();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
722new ReadOnlySpan<byte>(arrByte, 0, byteCount).CopyTo(new Span<byte>(bytes, byteCount)); 871new ReadOnlySpan<char>(arrChar, 0, charCount).CopyTo(new Span<char>(chars, charCount));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (4)
501bytes: new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar), 533Span<byte> bytes = new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar); 1097chars: new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar), 1135Span<char> chars = new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar);
System\CrashInfo.cs (1)
410return new Span<byte>(ptr, size);
System\Runtime\InteropServices\PInvokeMarshal.cs (2)
308stringBuilder.CopyTo(0, new Span<char>((char*)destination, length), length); 523OperationStatus conversionStatus = Ascii.FromUtf16(new ReadOnlySpan<char>(pManaged, length), new Span<byte>(pNative, length), out _);
System.Private.Windows.Core (45)
_generated\211\Windows.Win32.PSTR.g.cs (1)
63 internal Span<byte> AsSpan() => this.Value is null ? default(Span<byte>) : new Span<byte>(this.Value, this.Length);
_generated\212\Windows.Win32.PWSTR.g.cs (1)
63 internal Span<char> AsSpan() => this.Value is null ? default(Span<char>) : new Span<char>(this.Value, this.Length);
System\IO\BinaryReaderExtensions.cs (1)
122Span<byte> arrayData = new(a, array.Length * sizeof(T));
System\IO\StreamExtensions.cs (1)
62Span<byte> span = new(buffer, size);
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (1)
359Span<char> fileBuffer = new(
Windows\Win32\Foundation\GlobalBuffer.cs (1)
42_buffer = new((byte*)_pointer, (int)length);
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (1)
25_bufferScope = new BufferScope<ARGB>(new Span<ARGB>(s, StackSpace), length);
Windows\Win32\Graphics\Gdi\RGNDATAHEADER.cs (1)
16return new Span<RECT>((byte*)regionData + regionData->dwSize, (int)regionData->nCount).ToArray();
Windows\Win32\System\Com\ComInterfaceTable.cs (1)
246Span<ComInterfaceEntry> entries = new(
Windows\Win32\System\Com\ComManagedStream.cs (1)
124Span<byte> buffer = new(pv, checked((int)cb));
Windows\Win32\System\Variant\VARIANT.cs (35)
292new Span<sbyte>(psa->pvData, array.Length) 296new Span<byte>(psa->pvData, array.Length) 300new Span<short>(psa->pvData, array.Length) 304new Span<ushort>(psa->pvData, array.Length) 309new Span<int>(psa->pvData, array.Length) 315new Span<uint>(psa->pvData, array.Length) 319new Span<long>(psa->pvData, array.Length) 323new Span<ulong>(psa->pvData, array.Length) 327new Span<float>(psa->pvData, array.Length) 331new Span<double>(psa->pvData, array.Length) 336Span<VARIANT_BOOL> data = new(psa->pvData, array.Length); 348Span<DECIMAL> data = new(psa->pvData, array.Length); 360Span<long> data = new(psa->pvData, array.Length); 372Span<double> data = new(psa->pvData, array.Length); 384Span<IntPtr> data = new(psa->pvData, array.Length); 397Span<IntPtr> data = new(psa->pvData, array.Length); 409Span<VARIANT> data = new(psa->pvData, array.Length); 759return new Span<sbyte>(ca.pElems, (int)ca.cElems).ToArray(); 761return new Span<byte>(ca.pElems, (int)ca.cElems).ToArray(); 763return new Span<short>(ca.pElems, (int)ca.cElems).ToArray(); 765return new Span<ushort>(ca.pElems, (int)ca.cElems).ToArray(); 768Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems); 780return new Span<int>(ca.pElems, (int)ca.cElems).ToArray(); 784return new Span<uint>(ca.pElems, (int)ca.cElems).ToArray(); 786return new Span<long>(ca.pElems, (int)ca.cElems).ToArray(); 788return new Span<ulong>(ca.pElems, (int)ca.cElems).ToArray(); 790return new Span<float>(ca.pElems, (int)ca.cElems).ToArray(); 792return new Span<double>(ca.pElems, (int)ca.cElems).ToArray(); 795Span<long> data = new(ca.pElems, (int)ca.cElems); 807Span<double> data = new(ca.pElems, (int)ca.cElems); 819var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems); 830return new Span<Guid>(ca.pElems, (int)ca.cElems).ToArray(); 834Span<IntPtr> data = new(ca.pElems, (int)ca.cElems); 846Span<IntPtr> data = new(ca.pElems, (int)ca.cElems); 858Span<VARIANT> data = new(ca.pElems, (int)ca.cElems);
System.Reflection.Metadata (2)
System\Reflection\Internal\Utilities\StreamExtensions.netcoreapp.cs (1)
11=> stream.ReadExactly(new Span<byte>(buffer, size));
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (1)
102actualLength = deflate.ReadAtLeast(new Span<byte>(decompressed.Pointer, decompressed.Size), decompressed.Size, throwOnEndOfStream: false);
System.Runtime.InteropServices.JavaScript (4)
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Byte.cs (1)
158value = new Span<byte>((void*)slot.IntPtrValue, slot.Length);
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Double.cs (1)
164value = new Span<double>((void*)slot.IntPtrValue, slot.Length);
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Int32.cs (1)
158value = new Span<int>((void*)slot.IntPtrValue, slot.Length);
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Single.cs (1)
164value = new Span<float>((void*)slot.IntPtrValue, slot.Length);
System.Runtime.Numerics (1)
src\runtime\src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
39public NumberBuffer(NumberBufferKind kind, byte* digits, int digitsLength) : this(kind, new Span<byte>(digits, digitsLength))
System.Security.Cryptography (9)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
52Span<char> dest = new Span<char>((void*)handle, spanLen);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeUnicodeStringHandle.cs (1)
38Span<char> dest = new Span<char>(handle.ToPointer(), cch);
src\runtime\src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
81return new Span<byte>(_pointer, _length);
src\runtime\src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.cs (1)
244Span<byte> salt = new Span<byte>(pbeParams.rgbSalt, Interop.NCrypt.PBE_PARAMS.RgbSaltSize);
System\Security\Cryptography\FixedMemoryKeyBox.cs (2)
15key.CopyTo(new Span<byte>(memory, key.Length)); 24CryptographicOperations.ZeroMemory(new Span<byte>((void*)handle, _length));
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (1)
250return new Span<byte>(pCertContext->pbCertEncoded, pCertContext->cbCertEncoded).ToArray();
System\Security\Cryptography\X509Certificates\WindowsHelpers.cs (1)
60int bytesWritten = Encoding.ASCII.GetBytes(oidString, new Span<byte>(pOidContents, oidString.Length));
System.Security.Cryptography.Cose (1)
src\runtime\src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
System.Security.Cryptography.Pkcs (2)
Internal\Cryptography\Pal\Windows\HeapBlockRetainer.cs (1)
51var ascii = new Span<byte>((byte*)pb, length);
src\runtime\src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
379interopSpan = new Span<byte>(outputBlob.pbData.ToPointer(), length);
System.Security.Principal.Windows (2)
System\Security\Principal\WindowsIdentity.cs (2)
149sourceName.CopyTo(new Span<byte>(sourceContext.SourceName, TOKEN_SOURCE.TOKEN_SOURCE_LENGTH)); 188sourceName.CopyTo(new Span<byte>((void*)sourceNameBuffer.DangerousGetHandle(), sourceName.Length));
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceBase.cs (1)
585Span<SERVICE_TABLE_ENTRY> entries = new Span<SERVICE_TABLE_ENTRY>((void*)entriesPointer, services.Length + 1);
System.Text.Encoding.CodePages (1)
System\Text\BaseCodePageEncoding.netcoreapp.cs (1)
53Span<byte> pCodePageIndex = new Span<byte>(&codePageIndex, sizeof(CodePageIndex));
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\AllowedBmpCodePointsBitmap.cs (1)
69Span<uint> thisAllowedCharactersBitmap = new Span<uint>(pBitmap, BitmapLengthInDWords);
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (1)
102Span<char> destination = new Span<char>(buffer, bufferLength);
System.Windows.Forms (3)
System\Windows\Forms\ActiveX\AxHost.VBFormat.cs (1)
51Span<char> buffer = new(lpBuffer, cb / sizeof(char));
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
2120Span<int> boldDates = new((int*)nmmcds->prgDayState, nmmcds->cDayState);
System\Windows\Forms\Rendering\ControlPaint.cs (1)
203Span<RGBQUAD> colors = new(bi + sizeof(BITMAPINFOHEADER), (int)entryCount);
System.Windows.Forms.Primitives (6)
Interop\Richedit\Interop.CHARFORMAT2W.cs (1)
41get { fixed (char* c = _szFaceName) { return new Span<char>(c, (int)PInvokeCore.LF_FACESIZE); } }
Windows\Win32\System\Ole\CADWORD.cs (1)
16: new Span<uint>(pElems, (int)cElems).ToArray();
Windows\Win32\UI\Controls\LVITEMW.cs (1)
25Span<char> targetSpan = new(pszText, cchTextMax);
Windows\Win32\UI\Shell\NOTIFYICONDATAW.cs (3)
27get { fixed (char* c = _szTip) { return new Span<char>(c, 128); } } 38get { fixed (char* c = _szInfo) { return new Span<char>(c, 256); } } 49get { fixed (char* c = _szInfoTitle) { return new Span<char>(c, 64); } }