218 references to ReadOnlySpan
GenerateDocumentationAndConfigFiles (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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 (2)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
809return checked((long)DwarfHelper.ReadULEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32))); 813return DwarfHelper.ReadSLEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32));
ILCompiler.MetadataTransform (1)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.String.cs (1)
55return new(_base + offset, (int)numBytes);
ILCompiler.ReadyToRun (3)
JitInterface\CorInfoImpl.ReadyToRun.cs (1)
3559CorInfoWasmType[] typeArray = new ReadOnlySpan<CorInfoWasmType>(types, (int)typesSize).ToArray();
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
809return checked((long)DwarfHelper.ReadULEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32))); 813return DwarfHelper.ReadSLEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32));
ILCompiler.TypeSystem (10)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaField.cs (2)
269return new ReadOnlySpan<byte>(_namePointer, _nameLength); 279return new ReadOnlySpan<byte>(namePointer, _nameLength);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaMethod.cs (2)
407return new ReadOnlySpan<byte>(_namePointer, _nameLength); 417return new ReadOnlySpan<byte>(namePointer, _nameLength);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.cs (4)
255return new ReadOnlySpan<byte>(_namePointer, _nameLength); 265return new ReadOnlySpan<byte>(namePointer, _nameLength); 276return new ReadOnlySpan<byte>(_namespacePointer, _namespaceLength); 286return new ReadOnlySpan<byte>(namespacePointer, _namespaceLength);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (1)
320return new ReadOnlySpan<byte>(blobReader.CurrentPointer, blobReader.Length);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\SymbolReader\PortablePdbSymbolReader.cs (1)
221return new ReadOnlySpan<byte>(br.StartPointer, br.Length);
libmscordaccore_universal (1)
Entrypoints.cs (1)
120new ReadOnlySpan<byte>(alignedBuffer, buffer.Length).CopyTo(buffer);
Microsoft.AspNetCore.Cryptography.Internal (2)
CryptoUtil.cs (2)
81var bytesA = new ReadOnlySpan<byte>(bufA, byteCount); 82var bytesB = new ReadOnlySpan<byte>(bufB, byteCount);
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingBasedDataProtector.cs (1)
150return new Guid(new ReadOnlySpan<byte>(ptr, sizeof(Guid)));
Microsoft.AspNetCore.Razor.Utilities.Shared (3)
Utilities\Hashing\XxHash128.cs (1)
198current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
Utilities\Hashing\XxHashShared.cs (2)
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 (8)
_generated\74\Windows.Win32.PCSTR.g.cs (1)
75 internal ReadOnlySpan<byte> AsSpan() => this.Value is null ? default(ReadOnlySpan<byte>) : new ReadOnlySpan<byte>(this.Value, this.Length);
_generated\75\Windows.Win32.PCWSTR.g.cs (1)
75 internal ReadOnlySpan<char> AsSpan() => this.Value is null ? default(ReadOnlySpan<char>) : new ReadOnlySpan<char>(this.Value, this.Length);
NativeInterop\RequestQueue.cs (2)
150new ReadOnlySpan<byte>(&length, sizeof(long))); 167new ReadOnlySpan<byte>(&verbosityLong, sizeof(long)));
RequestProcessing\ResponseBody.cs (1)
275SetDataChunkWithPinnedData(chunks, ref chunkIndex, new ReadOnlySpan<byte>((void*)(handle.AddrOfPinnedObject() + buffer.Offset), buffer.Count));
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderEncoding.cs (2)
16header = new ReadOnlySpan<byte>(pBytes, byteCount).GetLatin1String(); 20header = new ReadOnlySpan<byte>(pBytes, byteCount).GetAsciiOrUTF8String(Encoding.UTF8);
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
851new ReadOnlySpan<byte>(pToken, tokenSize).CopyTo(token);
Microsoft.AspNetCore.Server.IIS (5)
_generated\39\Windows.Win32.PCSTR.g.cs (1)
75 internal ReadOnlySpan<byte> AsSpan() => this.Value is null ? default(ReadOnlySpan<byte>) : new ReadOnlySpan<byte>(this.Value, this.Length);
_generated\40\Windows.Win32.PCWSTR.g.cs (1)
75 internal ReadOnlySpan<char> AsSpan() => this.Value is null ? default(ReadOnlySpan<char>) : new ReadOnlySpan<char>(this.Value, this.Length);
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderEncoding.cs (2)
16header = new ReadOnlySpan<byte>(pBytes, byteCount).GetLatin1String(); 20header = new ReadOnlySpan<byte>(pBytes, byteCount).GetAsciiOrUTF8String(Encoding.UTF8);
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
851new ReadOnlySpan<byte>(pToken, tokenSize).CopyTo(token);
Microsoft.CodeAnalysis (4)
Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
Hashing\XxHashShared.cs (2)
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));
MetadataReader\PEModule.cs (1)
4031return StringTable.AddSharedUtf8(new ReadOnlySpan<byte>(bytes, byteCount));
Microsoft.CodeAnalysis.Analyzers (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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 (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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 (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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 (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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 (4)
Serialization\SerializerService_Reference.cs (1)
543writer.WriteSpan(new ReadOnlySpan<byte>(reader.MetadataPointer, reader.MetadataLength));
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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.Diagnostics.DataContractReader.Legacy (15)
ClrDataExceptionState.cs (1)
178Debug.Assert(str == null || cmpLen <= 0 || new ReadOnlySpan<char>(strLocal, 0, cmpLen).SequenceEqual(new ReadOnlySpan<char>(str, cmpLen)));
ClrDataModule.cs (1)
744Debug.Assert(new ReadOnlySpan<byte>(outBuffer, (int)outBufferSize).SequenceEqual(localBuffer));
Dbi\DacDbiImpl.cs (7)
858new ReadOnlySpan<byte>((void*)pRecord, recordSize).CopyTo(recordBytes); 1663ReadOnlySpan<byte> cdacBytes = new(pInternalContextBuffer, (int)contextSize); 1664ReadOnlySpan<byte> legacyBytes = new(pLocal, (int)contextSize); 1754ReadOnlySpan<byte> cdacBytes = new(pContext, (int)contextSize); 1755ReadOnlySpan<byte> legacyBytes = new(pLocal, (int)contextSize); 1977ReadOnlySpan<byte> cctx = new((byte*)pcdac->ctx, (int)contextSize); 1978ReadOnlySpan<byte> lctx = new(pLegacyCtx, (int)contextSize);
MetaDataImportImpl.cs (3)
1432new ReadOnlySpan<char>(dataPtr, copyChars).CopyTo(new Span<char>(szString, copyChars)); 2074ReadOnlySpan<byte> cdacSpan = new(cdacBlob, (int)cdacLen); 2075ReadOnlySpan<byte> dacSpan = new(dacBlob, (int)dacLen);
SOSDacImpl.cs (2)
2124Debug.Assert(name == null || new ReadOnlySpan<byte>(name, (int)neededLocal).SequenceEqual(nameLocal!.AsSpan(0, (int)neededLocal))); 3875Debug.Assert(buffer is null || new ReadOnlySpan<char>(bufferLocal, 0, (int)Math.Min(count, neededLocal)).SequenceEqual(new ReadOnlySpan<char>(buffer, (int)Math.Min(count, neededLocal))));
SOSDacImpl.IXCLRDataProcess.cs (1)
325Debug.Assert(new ReadOnlySpan<char>(nameBuf, (int)nameLenLocal)
Microsoft.ML.ImageAnalytics (1)
MLImage.cs (1)
169return new ReadOnlySpan<byte>(pixelsPtr.ToPointer(), _image.ByteCount);
Microsoft.ML.Tokenizers (1)
Utils\StringSpanOrdinalKey.cs (1)
35new ReadOnlySpan<char>(Ptr, Length) :
Microsoft.Private.Windows.Core (12)
_generated\10\Windows.Win32.BSTR.g.cs (1)
64 public static unsafe implicit operator ReadOnlySpan<char>(BSTR bstr) => bstr.Value != null ? new ReadOnlySpan<char>(bstr.Value, *((int*)bstr.Value - 1) / 2) : default(ReadOnlySpan<char>);
_generated\189\Windows.Win32.PCSTR.g.cs (1)
75 internal ReadOnlySpan<byte> AsSpan() => this.Value is null ? default(ReadOnlySpan<byte>) : new ReadOnlySpan<byte>(this.Value, this.Length);
_generated\190\Windows.Win32.PCWSTR.g.cs (1)
75 internal ReadOnlySpan<char> AsSpan() => this.Value is null ? default(ReadOnlySpan<char>) : new ReadOnlySpan<char>(this.Value, this.Length);
_generated\214\Windows.Win32.RECT.InlineArrays.g.cs (2)
34 new ReadOnlySpan<winmdroot.Foundation.RECT>(p0, SpanLength).Slice(0, length).CopyTo(target); 40 return new ReadOnlySpan<winmdroot.Foundation.RECT>(p0, SpanLength).Slice(0, length).ToArray();
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (4)
211ReadOnlySpan<char> chars = new((char*)buffer, size / sizeof(char)); 224ReadOnlySpan<byte> bytes = new((byte*)buffer, size); 257ReadOnlySpan<byte> bytes = new((byte*)buffer, size); 291ReadOnlySpan<byte> bytes = new((byte*)buffer, size);
Windows\Win32\System\Com\ComManagedStream.cs (1)
241ReadOnlySpan<byte> buffer = new(pv, checked((int)cb));
Windows\Win32\System\Com\SAFEARRAY.cs (2)
19return new ReadOnlySpan<SAFEARRAYBOUND>(b, cDims)[dimension]; 80ReadOnlySpan<SAFEARRAYBOUND> bounds = new(b, cDims);
Microsoft.Win32.Registry (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
PresentationCore (3)
System\Windows\Input\InputProcessorProfiles.cs (1)
111ReadOnlySpan<short> languageIDs = new((void*)ptrLanguageIDs, nCount);
System\Windows\Media\PixelFormat.cs (2)
156ReadOnlySpan<byte> pGuidPixelFormat = new(&guidPixelFormat, 15); 157ReadOnlySpan<byte> pGuidBuiltIn = new(&guidWicPixelFormat, 15);
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
297var abiSpan = new ReadOnlySpan<T>(abi.data.ToPointer(), abi.length);
Roslyn.Diagnostics.Analyzers (3)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
200current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
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));
System.Console (1)
System\IO\StdInReader.cs (1)
353AppendExtraBuffer(new ReadOnlySpan<byte>(bufPtr, result));
System.Data.OleDb (2)
SafeHandles.cs (2)
263ReadOnlySpan<byte> span1 = new ReadOnlySpan<byte>(buf1.ToPointer(), count); 264ReadOnlySpan<byte> span2 = new ReadOnlySpan<byte>(buf2.ToPointer(), count);
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Activity.cs (2)
2126return new ActivitySpanId(Convert.ToHexStringLower(new ReadOnlySpan<byte>(&id, sizeof(ulong)))); 2201_hexString = Convert.ToHexStringLower(new ReadOnlySpan<byte>(&id, sizeof(ulong)));
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.Drawing.Common (7)
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\ImageCodecInfo.cs (4)
54imageCodecs = FromNative(new((GdiPlus.ImageCodecInfo*)b, (int)numDecoders)); 75imageCodecs = FromNative(new((GdiPlus.ImageCodecInfo*)b, (int)numEncoders)); 107codec.SignaturePatterns[j] = new ReadOnlySpan<byte>(codecInfo[i].SigPattern + j * codecInfo[i].SigSize, (int)codecInfo[i].SigSize).ToArray(); 108codec.SignatureMasks[j] = new ReadOnlySpan<byte>(codecInfo[i].SigMask + j * codecInfo[i].SigSize, (int)codecInfo[i].SigSize).ToArray();
System\Drawing\Printing\PrinterSettings.cs (1)
171ReadOnlySpan<PRINTER_INFO_4W> info = new(b, (int)count);
System.Formats.Asn1 (4)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (4)
51return GetByteCount(new ReadOnlySpan<char>(chars, count)); 79new ReadOnlySpan<char>(chars, charCount), 91return GetCharCount(new ReadOnlySpan<byte>(bytes, count)); 114new ReadOnlySpan<byte>(bytes, byteCount),
System.IO.FileSystem.AccessControl (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.IO.Hashing (4)
System\IO\Hashing\XxHash128.cs (1)
196current = HashToHash128(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
System\IO\Hashing\XxHash3.cs (1)
195current = HashToUInt64(new ReadOnlySpan<byte>(buffer, (int)_state.TotalLength), (long)_state.Seed);
System\IO\Hashing\XxHashShared.cs (2)
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.Net.Http.WinHttpHandler (2)
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
35internal unsafe ReadOnlySpan<byte> DangerousAsSpan() => new ReadOnlySpan<byte>((void*)pbData, (int)cbData);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.Net.NameResolution (2)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.IPAddress.cs (1)
72new ReadOnlySpan<byte>(other.Address, addressByteCount));
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
37new ReadOnlySpan<byte>(nativeIPAddress.Address, Interop.Sys.IPv6AddressBytes),
System.Net.Primitives (1)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.IPAddress.cs (1)
72new ReadOnlySpan<byte>(other.Address, addressByteCount));
System.Net.Quic (2)
System\Net\Quic\Internal\MsQuicTlsSecret.cs (1)
55? new ReadOnlySpan<byte>(_tlsSecrets->ClientRandom, 32)
System\Net\Quic\QuicStream.cs (1)
601new ReadOnlySpan<QUIC_BUFFER>(data.Buffers, (int)data.BufferCount),
System.Net.Security (4)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (1)
55new ReadOnlySpan<byte>(_data, checked((int)_length)) :
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
78return new ReadOnlySpan<byte>((void*)protocol, len);
System\Net\Security\TlsSession.OpenSsl.cs (2)
153ReadOnlySpan<byte> frame = new ReadOnlySpan<byte>(framePtr, frameLen); 212bytes = new ReadOnlySpan<byte>(ptr, len);
System.Net.Sockets (5)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.IPAddress.cs (1)
72new ReadOnlySpan<byte>(other.Address, addressByteCount));
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
37new ReadOnlySpan<byte>(nativeIPAddress.Address, Interop.Sys.IPv6AddressBytes),
System\Net\Sockets\NetworkStream.cs (1)
347Write(new ReadOnlySpan<byte>(&value, 1));
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
431return SocketPal.TryCompleteSendTo(context._socket, new ReadOnlySpan<byte>(BufferPtr, bufferLength), null, ref bufferIndex, ref Offset, ref Count, Flags, SocketAddress.Span, ref BytesTransferred, out ErrorCode);
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
329foreach (var socketEvent in new ReadOnlySpan<Interop.Sys.SocketEvent>(Buffer, numEvents))
System.Private.CoreLib (39)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (2)
59int end = new ReadOnlySpan<byte>(buffer, length).IndexOf((byte)0); 81int end = new ReadOnlySpan<char>(buffer, length).IndexOf('\0');
Internal\Runtime\CompilerHelpers\ReachabilityInstrumentationSupport.cs (1)
61File.WriteAllBytes(ReachabilityFileName, new ReadOnlySpan<byte>(s_region, s_size));
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.String.cs (1)
55return new(_base + offset, (int)numBytes);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadDir.cs (1)
39: new ReadOnlySpan<byte>(Name, NameLength);
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (1)
962vlb.Append(new ReadOnlySpan<TChar>(p, (int)(digits + MaxUInt32DecDigits - p)));
src\runtime\src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
282var value = new ReadOnlySpan<TChar>(str, (int)(strEnd - str));
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (2)
194ReadOnlySpan<byte> assemblySpan = new ReadOnlySpan<byte>(assembly, (int)assemblyByteLength); 198symbolsSpan = new ReadOnlySpan<byte>(symbols, (int)symbolsByteLength);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
164ReadOnlySpan<byte> payload = new ReadOnlySpan<byte>((void*)instanceData.Payload, (int)instanceData.PayloadLength);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
32id = BitConverter.ToUInt64(new ReadOnlySpan<byte>(additionalData, sizeof(ulong)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (1)
328span = new ReadOnlySpan<char>(buffer, ICU_ULOC_KEYWORD_AND_VALUES_CAPACITY);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
192outputBuffer.Append(new ReadOnlySpan<TChar>(p, (int)(buffer + 16 - p)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (1)
873vlb.Append(new ReadOnlySpan<TChar>(pExponent, digitCount));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
173return BinaryPrimitives.ReadInt32LittleEndian(new ReadOnlySpan<byte>(p, sizeof(int)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
102return new ReadOnlySpan<TUnmanagedElement>(unmanagedValue, numElements);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (1)
103return new ReadOnlySpan<TUnmanagedElement>(unmanagedValue, numElements);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
213return new ReadOnlySpan<TUnmanagedElement>(_unmanagedArray, numElements);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
107return new ReadOnlySpan<TUnmanagedElement>(unmanaged, numElements);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
255value != null ? new ReadOnlySpan<char>(value, string.wcslen(value)) : 265value != null ? new ReadOnlySpan<byte>(value, string.strlen(value)) :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
33Initialize(new ReadOnlySpan<char>(value, length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.cs (1)
280return enc.GetString(new ReadOnlySpan<byte>(pStart, length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (4)
576char[] arrChar = new ReadOnlySpan<char>(chars, count).ToArray(); 703char[] arrChar = new ReadOnlySpan<char>(chars, charCount).ToArray(); 778byte[] arrByte = new ReadOnlySpan<byte>(bytes, count).ToArray(); 852byte[] arrByte = new ReadOnlySpan<byte>(bytes, byteCount).ToArray();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (8)
235chars: new ReadOnlySpan<char>(pCharsOriginal, originalCharCount).Slice(charsConsumedSoFar), 264ReadOnlySpan<char> chars = new ReadOnlySpan<char>(pOriginalChars, originalCharCount).Slice(charsConsumedSoFar); 499chars: new ReadOnlySpan<char>(pOriginalChars, originalCharCount).Slice(charsConsumedSoFar), 532ReadOnlySpan<char> chars = new ReadOnlySpan<char>(pOriginalChars, originalCharCount).Slice(charsConsumedSoFar); 829bytes: new ReadOnlySpan<byte>(pBytesOriginal, originalByteCount).Slice(bytesConsumedSoFar), 858ReadOnlySpan<byte> bytes = new ReadOnlySpan<byte>(pOriginalBytes, originalByteCount).Slice(bytesConsumedSoFar); 1095bytes: new ReadOnlySpan<byte>(pOriginalBytes, originalByteCount).Slice(bytesConsumedSoFar), 1134ReadOnlySpan<byte> bytes = new ReadOnlySpan<byte>(pOriginalBytes, originalByteCount).Slice(bytesConsumedSoFar);
System\CrashInfo.cs (1)
113if (!WriteValue("runtime_version"u8, new ReadOnlySpan<byte>(RuntimeImports.RhGetRuntimeVersion(out int cbLength), cbLength)))
System\Runtime\InteropServices\PInvokeMarshal.cs (2)
505bool allAscii = Ascii.IsValid(new ReadOnlySpan<char>(pManaged, lenUnicode)); 523OperationStatus conversionStatus = Ascii.FromUtf16(new ReadOnlySpan<char>(pManaged, length), new Span<byte>(pNative, length), out _);
System\Text\StringBuilder.NativeAot.cs (1)
40new ReadOnlySpan<char>(newBuffer, len).CopyTo(chunkChars);
System.Private.DataContractSerialization (2)
System\Xml\XmlStreamNodeWriter.cs (2)
340new ReadOnlySpan<char>(chars, charCount) 345BinaryPrimitives.ReverseEndianness(new ReadOnlySpan<short>(chars, charCount),
System.Private.Reflection.Execution (1)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.String.cs (1)
55return new(_base + offset, (int)numBytes);
System.Private.TypeLoader (2)
Internal\TypeSystem\TypeSystemContext.Runtime.cs (1)
198ReadOnlySpan<Runtime.GenericVariance> varianceData = new ReadOnlySpan<Runtime.GenericVariance>(runtimeVariance, runtimeVariance == null ? 0 : genericParameters.Length);
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatReader.String.cs (1)
55return new(_base + offset, (int)numBytes);
System.Private.Windows.Core (10)
_generated\10\Windows.Win32.BSTR.g.cs (1)
64 public static unsafe implicit operator ReadOnlySpan<char>(BSTR bstr) => bstr.Value != null ? new ReadOnlySpan<char>(bstr.Value, *((int*)bstr.Value - 1) / 2) : default(ReadOnlySpan<char>);
_generated\190\Windows.Win32.PCSTR.g.cs (1)
75 internal ReadOnlySpan<byte> AsSpan() => this.Value is null ? default(ReadOnlySpan<byte>) : new ReadOnlySpan<byte>(this.Value, this.Length);
_generated\191\Windows.Win32.PCWSTR.g.cs (1)
75 internal ReadOnlySpan<char> AsSpan() => this.Value is null ? default(ReadOnlySpan<char>) : new ReadOnlySpan<char>(this.Value, this.Length);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (4)
211ReadOnlySpan<char> chars = new((char*)buffer, size / sizeof(char)); 224ReadOnlySpan<byte> bytes = new((byte*)buffer, size); 257ReadOnlySpan<byte> bytes = new((byte*)buffer, size); 291ReadOnlySpan<byte> bytes = new((byte*)buffer, size);
Windows\Win32\System\Com\ComManagedStream.cs (1)
241ReadOnlySpan<byte> buffer = new(pv, checked((int)cb));
Windows\Win32\System\Com\SAFEARRAY.cs (2)
19return new ReadOnlySpan<SAFEARRAYBOUND>(b, cDims)[dimension]; 80ReadOnlySpan<SAFEARRAYBOUND> bounds = new(b, cDims);
System.Private.Windows.GdiPlus (1)
System\Drawing\ImageCodecInfoHelper.cs (1)
51ReadOnlySpan<ImageCodecInfo> codecInfo = new((ImageCodecInfo*)b, (int)numEncoders);
System.Reflection.Metadata (7)
System\Reflection\Internal\MemoryBlocks\AbstractMemoryBlock.cs (1)
43var result = new ReadOnlySpan<byte>(Pointer + start, length).ToImmutableArray();
System\Reflection\Internal\Utilities\MemoryBlock.cs (4)
318ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(Pointer + offset, Length - offset); 340ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(Pointer + startOffset, Length - startOffset); 510return new ReadOnlySpan<byte>(Pointer + offset, byteCount).ToArray(); 521int i = new ReadOnlySpan<byte>(Pointer + start, Length - start).IndexOf(b);
System\Reflection\Metadata\BlobBuilder.cs (1)
675WriteBytesUnchecked(new ReadOnlySpan<byte>(buffer, byteCount));
System\Reflection\Metadata\BlobWriter.cs (1)
148WriteBytes(new ReadOnlySpan<byte>(buffer, byteCount));
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\General\Ecma\EcmaHelpers.cs (1)
115return new ReadOnlySpan<byte>(br.CurrentPointer, br.Length);
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (1)
87ReadOnlySpan<byte> actual = new ReadOnlySpan<byte>(br.CurrentPointer, br.Length);
System.Resources.Extensions (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
173return BinaryPrimitives.ReadInt32LittleEndian(new ReadOnlySpan<byte>(p, sizeof(int)));
System.Runtime.Numerics (2)
src\runtime\src\libraries\Common\src\System\Number.Formatting.Common.cs (1)
962vlb.Append(new ReadOnlySpan<TChar>(p, (int)(digits + MaxUInt32DecDigits - p)));
src\runtime\src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
282var value = new ReadOnlySpan<TChar>(str, (int)(strEnd - str));
System.Security.Cryptography (8)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
102return new ReadOnlySpan<char>((char*)handle, Length);
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
35internal unsafe ReadOnlySpan<byte> DangerousAsSpan() => new ReadOnlySpan<byte>((void*)pbData, (int)cbData);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.Windows.cs (1)
38ReadOnlySpan<char> paramSetWithNull = new(pExportedSpan + blobHeaderSize, paramSetSize / sizeof(char));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519WindowsHelpers.cs (3)
51ReadOnlySpan<byte> y = new(pExportedSpan + blobHeaderSize + ElementSize, ElementSize); 61ReadOnlySpan<byte> d = new(pExportedSpan + blobHeaderSize + ElementSize * 2, ElementSize); 66ReadOnlySpan<byte> x = new(pExportedSpan + blobHeaderSize, ElementSize);
System\Security\Cryptography\FixedMemoryKeyBox.cs (1)
20internal ReadOnlySpan<byte> DangerousKeySpan => new ReadOnlySpan<byte>((void*)handle, _length);
System.Security.Cryptography.Pkcs (2)
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
35internal unsafe ReadOnlySpan<byte> DangerousAsSpan() => new ReadOnlySpan<byte>((void*)pbData, (int)cbData);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.Security.Cryptography.ProtectedData (2)
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
35internal unsafe ReadOnlySpan<byte> DangerousAsSpan() => new ReadOnlySpan<byte>((void*)pbData, (int)cbData);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.Text.Encodings.Web (1)
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (1)
96return GetIndexOfFirstCharToEncode(new ReadOnlySpan<char>(text, textLength)); // performs bounds checking
System.Threading.AccessControl (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (1)
65return GetAndTrimString(new ReadOnlySpan<char>((char*)nativeMsgPtr, length));
System.Windows.Extensions (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
35internal unsafe ReadOnlySpan<byte> DangerousAsSpan() => new ReadOnlySpan<byte>((void*)pbData, (int)cbData);
System.Windows.Forms (2)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
399? GetMultiselectFiles(new((char*)lpOFN->lpstrFile, (int)lpOFN->nMaxFile))
System\Windows\Forms\Rendering\ControlPaint.cs (1)
299ReadOnlySpan<ARGB> colors = new((ARGB*)data.Scan0, width * height);