205 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)
parent\parent\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
883return checked((long)DwarfHelper.ReadULEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32))); 887return DwarfHelper.ReadSLEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32));
ILCompiler.MetadataTransform (1)
parent\parent\Common\Internal\NativeFormat\NativeFormatReader.String.cs (1)
55return new(_base + offset, (int)numBytes);
ILCompiler.ReadyToRun (3)
parent\parent\Common\Compiler\DependencyAnalysis\Relocation.cs (2)
883return checked((long)DwarfHelper.ReadULEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32))); 887return DwarfHelper.ReadSLEB128(new ReadOnlySpan<byte>(location, WASM_PADDED_RELOC_SIZE_32));
parent\parent\Common\JitInterface\CorInfoImpl.cs (1)
3688CorInfoWasmType[] typeArray = new ReadOnlySpan<CorInfoWasmType>(types, (int)typesSize).ToArray();
ILCompiler.RyuJit (1)
parent\parent\Common\JitInterface\CorInfoImpl.cs (1)
3688CorInfoWasmType[] typeArray = new ReadOnlySpan<CorInfoWasmType>(types, (int)typesSize).ToArray();
ILCompiler.TypeSystem (10)
parent\parent\Common\TypeSystem\Ecma\EcmaField.cs (2)
269return new ReadOnlySpan<byte>(_namePointer, _nameLength); 279return new ReadOnlySpan<byte>(namePointer, _nameLength);
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.cs (2)
407return new ReadOnlySpan<byte>(_namePointer, _nameLength); 417return new ReadOnlySpan<byte>(namePointer, _nameLength);
parent\parent\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);
parent\parent\Common\TypeSystem\Ecma\MetadataExtensions.cs (1)
320return new ReadOnlySpan<byte>(blobReader.CurrentPointer, blobReader.Length);
parent\parent\Common\TypeSystem\Ecma\SymbolReader\PortablePdbSymbolReader.cs (1)
221return new ReadOnlySpan<byte>(br.StartPointer, br.Length);
libmscordaccore_universal (2)
Entrypoints.cs (2)
133new ReadOnlySpan<byte>(alignedBuffer, buffer.Length).CopyTo(buffer); 535new ReadOnlySpan<byte>(alignedBuffer, bufferToFill.Length).CopyTo(bufferToFill);
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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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 (2)
Dbi\DacDbiImpl.cs (1)
1014new ReadOnlySpan<byte>((void*)pRecord, recordSize).CopyTo(recordBytes);
MetaDataImportImpl.cs (1)
1568new ReadOnlySpan<char>(dataPtr, copyChars).CopyTo(new Span<char>(szString, copyChars));
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 (25)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.byte.InlineArrays.g.cs (3)
39 new ReadOnlySpan<byte>(p0, SpanLength).Slice(0, length).CopyTo(target); 45 return new ReadOnlySpan<byte>(p0, SpanLength).Slice(0, length).ToArray(); 52 ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(p0, SpanLength);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.char.InlineArrays.g.cs (10)
40 new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).CopyTo(target); 46 return new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).ToArray(); 53 ReadOnlySpan<char> span = new ReadOnlySpan<char>(p0, SpanLength); 69 return new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).ToString(); 78 return new ReadOnlySpan<char>(p0, SpanLength).SliceAtNull().ToString(); 114 new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).CopyTo(target); 120 return new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).ToArray(); 127 ReadOnlySpan<char> span = new ReadOnlySpan<char>(p0, SpanLength); 143 return new ReadOnlySpan<char>(p0, SpanLength).Slice(0, length).ToString(); 152 return new ReadOnlySpan<char>(p0, SpanLength).SliceAtNull().ToString();
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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.TestPlatform.AdapterUtilities (2)
src\vstest\src\Microsoft.TestPlatform.Hashing.Source\XxHashShared.cs (2)
451new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 452new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
src\vstest\src\Microsoft.TestPlatform.Hashing.Source\XxHashShared.cs (2)
451new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 452new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
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)
2203return new ActivitySpanId(Convert.ToHexStringLower(new ReadOnlySpan<byte>(&id, sizeof(ulong)))); 2278_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.Formats.Asn1 (4)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (4)
50return GetByteCount(new ReadOnlySpan<char>(chars, count)); 78new ReadOnlySpan<char>(chars, charCount), 90return GetCharCount(new ReadOnlySpan<byte>(bytes, count)); 113new 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.Quic (2)
System\Net\Quic\Internal\MsQuicTlsSecret.cs (1)
55? new ReadOnlySpan<byte>(_tlsSecrets->ClientRandom, 32)
System\Net\Quic\QuicStream.cs (1)
602new 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)
162ReadOnlySpan<byte> frame = new ReadOnlySpan<byte>(framePtr, frameLen); 221bytes = new ReadOnlySpan<byte>(ptr, len);
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
241return SocketPal.TryCompleteSendTo(context._socket, new ReadOnlySpan<byte>(BufferPtr, bufferLength), null, ref bufferIndex, ref Offset, ref Count, Flags, SocketAddress.Span, ref BytesTransferred, out ErrorCode);
System.Private.CoreLib (36)
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\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)
165ReadOnlySpan<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\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)
294value != null ? new ReadOnlySpan<char>(value, string.wcslen(value)) : 304value != 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)
282return 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);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PollThread.cs (1)
246foreach (var handleEvent in new ReadOnlySpan<Interop.Sys.HandleEvent>(_buffer, numEvents))
System\CrashInfo.cs (1)
113if (!WriteValue("runtime_version"u8, new ReadOnlySpan<byte>(RuntimeImports.RhGetRuntimeVersion(out int cbLength), cbLength)))
System\Runtime\InteropServices\PInvokeMarshal.cs (2)
492bool allAscii = Ascii.IsValid(new ReadOnlySpan<char>(pManaged, lenUnicode)); 510OperationStatus 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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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.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);