211 references to Span
BuildValidator (3)
CompilationDiff.cs (3)
331writeAllBytes(pdbFilePath, new Span<byte>(buildInfo.PdbMetadataReader.MetadataPointer, buildInfo.PdbMetadataReader.MetadataLength)); 439var originalPdbSpan = new Span<byte>(originalInfo.PdbMetadataReader.MetadataPointer, originalInfo.PdbMetadataReader.MetadataLength); 440var rebuildPdbSpan = new Span<byte>(rebuildInfo.PdbMetadataReader.MetadataPointer, rebuildInfo.PdbMetadataReader.MetadataLength);
InMemory.FunctionalTests (3)
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.Components.Server (1)
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)
299var span = new Span<byte>(ptr, sizeof(Guid));
Microsoft.AspNetCore.Http.Connections.Common (1)
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
118_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.OpenApi (1)
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
118_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.Server.HttpSys (7)
RequestProcessing\Response.cs (3)
539unknownHeaders = new Span<HTTP_UNKNOWN_HEADER>(unknownAlloc, numUnknownHeaders); 570knownHeaderInfo = new Span<HTTP_RESPONSE_INFO>(responseAlloc, numKnownMultiHeaders); 584var nativeHeaderValues = new Span<HTTP_KNOWN_HEADER>(headerAlloc, headerValues.Count);
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\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
843return new Span<T>(_pointer, _length);
Microsoft.AspNetCore.Server.IIS (5)
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\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
287return new Span<byte>(NativeRequest->pRawUrl, NativeRequest->RawUrlLength); 843return new Span<T>(_pointer, _length);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
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.Microbenchmarks (3)
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\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\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.Sockets (3)
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.Shared.Tests (2)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
287return new Span<byte>(NativeRequest->pRawUrl, NativeRequest->RawUrlLength); 843return new Span<T>(_pointer, _length);
Microsoft.AspNetCore.SignalR.Common (1)
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
118_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
118_encoder.Convert(new Span<char>(&value, 1), destination, false, out charsUsed, out bytesUsed, out _);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
118_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.CodeStyle (9)
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 (9)
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.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)
529trieBlob = new Span<DoubleArrayUnit>((DoubleArrayUnit*)pBlob, (int)trieBlobSize / 4).ToArray();
PresentationCore (1)
System\Windows\Media\StreamAsIStream.cs (1)
536var span = new Span<byte>(buffer.ToPointer(), (int) cb);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Activity.cs (1)
2085ActivityTraceId.SetToRandomBytes(new Span<byte>(&id, sizeof(ulong)));
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ForkAndExecProcess.cs (1)
70int bytesWritten = Encoding.UTF8.GetBytes(str, new Span<byte>(arrPtr[i], byteLength));
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (2)
123new Span<byte>(bytes, byteCount), 158new Span<char>(chars, charCount),
System.Formats.Cbor (1)
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)
117Debug.Assert(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret)); 168DefaultSecret.CopyTo(new Span<byte>(secret, SecretLengthBytes)); 251source.CopyTo(new Span<byte>(buffer + state.BufferedCount, source.Length)); 266source.Slice(0, loadSize).CopyTo(new Span<byte>(buffer + state.BufferedCount, loadSize)); 305source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 318source.Slice(sourceIndex - StripeLengthBytes, StripeLengthBytes).CopyTo(new Span<byte>(buffer + InternalBufferLengthBytes - StripeLengthBytes, StripeLengthBytes)); 322Span<byte> remaining = new Span<byte>(buffer, source.Length - sourceIndex); 381new ReadOnlySpan<byte>(buffer + InternalBufferLengthBytes - catchupSize, catchupSize).CopyTo(new Span<byte>(lastStripe, StripeLengthBytes)); 382new ReadOnlySpan<byte>(buffer, (int)state.BufferedCount).CopyTo(new Span<byte>(lastStripe + catchupSize, (int)state.BufferedCount));
System.IO.Pipes (1)
System\IO\Pipes\PipeStream.cs (1)
116return Read(new Span<byte>(&b, 1)) > 0 ? b : -1;
System.Memory (1)
System\Buffers\SequenceReaderExtensions.Binary.cs (1)
43Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
System.Net.NameResolution (2)
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)
174addr.TryWriteBytes(new Span<byte>(rawAddress, rawAddressLength), out int bytesWritten);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
465new 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)
630_negotiatedApplicationProtocol = new SslApplicationProtocol(new Span<byte>(data.NegotiatedAlpn, data.NegotiatedAlpnLength).ToArray());
System.Net.Security (4)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
752var clientList = new Span<byte>(inp, (int)inlen);
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
446md5.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)
985return new Span<byte>(_pointer, _length);
System.Net.Sockets (6)
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 (55)
src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
35public NumberBuffer(NumberBufferKind kind, byte* digits, int digitsLength) : this(kind, new Span<byte>(digits, digitsLength))
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\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (14)
308var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 336var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 680var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 739var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 794var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 851var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 910var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 971var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1026var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1083var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1144var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1205var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize)); 1262var vlb = new ValueListBuilder<char>(new Span<char>(stackPtr, CharStackBufferSize)); 1319var vlb = new ValueListBuilder<TChar>(new Span<TChar>(stackPtr, CharStackBufferSize));
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (2)
207shouldCopyBack = new Span<bool>(pArgStorage + _argCount, _argCount); 244shouldCopyBack = new Span<bool>(pStorage + _argCount * 2, _argCount);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
864Span<InternalComInterfaceDispatch> dispatches = new Span<InternalComInterfaceDispatch>(pDispatches, numSections);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (4)
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)); 975int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb)); 1016int nbWritten = Encoding.UTF8.GetBytes(s, new Span<byte>(pbMem, nb));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (1)
39int convertedBytes = Encoding.UTF8.GetBytes(s, new Span<byte>(buffer, bufferLength));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (2)
28Span<byte> buffer = new(mem, exactByteCount); 85buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (2)
61=> new Span<TUnmanagedElement>(unmanaged, numElements); 150_span = new Span<TUnmanagedElement>(_allocatedMemory, array.Length);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
84public Span<T> AsSpan() => new(_data, _numElements);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (2)
62=> new Span<TUnmanagedElement>(unmanaged, numElements); 151_span = new Span<TUnmanagedElement>(_allocatedMemory, array.Length);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
72=> new Span<TUnmanagedElement>(unmanaged, numElements);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (2)
66=> new Span<TUnmanagedElement>(unmanaged, numElements); 149_span = new Span<TUnmanagedElement>(_allocatedMemory, managed.Length);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (2)
29Span<byte> buffer = new(mem, exactByteCount); 89buffer = new Span<byte>((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (7)
290return new Span<char>((byte*)buffer.DangerousGetHandle(), (int)(buffer.ByteLength / 2)); 323span.Slice(0, length).CopyTo(new Span<char>((void*)ptr, length)); 334new Span<char>((void*)ptr, length).Clear(); 379Span<char> resultSpan = new Span<char>((void*)ptr, byteLength / sizeof(char)); 385Marshal.GetAnsiStringBytes(span, new Span<byte>((void*)ptr, byteLength)); 397new Span<byte>((void*)ptr, byteLength).Clear(); 464new Span<byte>((void*)handle, _byteLength).Clear();
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\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (4)
500bytes: new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar), 532Span<byte> bytes = new Span<byte>(pOriginalBytes, originalByteCount).Slice(bytesWrittenSoFar); 1096chars: new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar), 1134Span<char> chars = new Span<char>(pOriginalChars, originalCharCount).Slice(charsWrittenSoFar);
src\System\Reflection\Emit\DynamicILGenerator.cs (3)
897m_code = new Span<byte>(code, codeSize).ToArray(); 914m_exceptions = new Span<byte>(exceptions, exceptionsSize).ToArray(); 929m_localSignature = new Span<byte>(localSignature, signatureSize).ToArray();
src\System\StubHelpers.cs (1)
450Span<char> native = new Span<char>((char*)nativeHome, length);
src\System\Text\StringBuilder.CoreCLR.cs (2)
36new Span<char>(newBuffer, newLength).CopyTo(m_ChunkChars); 107CopyTo(0, new Span<char>((char*)dest, charLen), charLen);
System.Private.Windows.Core (24)
System\IO\BinaryReaderExtensions.cs (1)
122Span<byte> arrayData = new(a, array.Length * sizeof(T));
System\IO\StreamExtensions.cs (1)
53Span<byte> span = new(buffer, size);
Windows\Win32\Foundation\GlobalBuffer.cs (1)
43_buffer = new((byte*)_pointer, (int)length);
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (1)
26_bufferScope = new BufferScope<ARGB>(new Span<ARGB>(s, StackSpace), length);
Windows\Win32\System\Com\ComInterfaceTable.cs (1)
247Span<ComInterfaceEntry> entries = new(
Windows\Win32\System\Com\ComManagedStream.cs (1)
121Span<byte> buffer = new(pv, checked((int)cb));
Windows\Win32\System\Variant\VARIANT.cs (18)
751return new Span<sbyte>(ca.pElems, (int)ca.cElems).ToArray(); 753return new Span<byte>(ca.pElems, (int)ca.cElems).ToArray(); 755return new Span<short>(ca.pElems, (int)ca.cElems).ToArray(); 757return new Span<ushort>(ca.pElems, (int)ca.cElems).ToArray(); 760Span<VARIANT_BOOL> data = new(ca.pElems, (int)ca.cElems); 772return new Span<int>(ca.pElems, (int)ca.cElems).ToArray(); 776return new Span<uint>(ca.pElems, (int)ca.cElems).ToArray(); 778return new Span<long>(ca.pElems, (int)ca.cElems).ToArray(); 780return new Span<ulong>(ca.pElems, (int)ca.cElems).ToArray(); 782return new Span<float>(ca.pElems, (int)ca.cElems).ToArray(); 784return new Span<double>(ca.pElems, (int)ca.cElems).ToArray(); 787Span<long> data = new(ca.pElems, (int)ca.cElems); 799Span<double> data = new(ca.pElems, (int)ca.cElems); 811var data = new Span<FILETIME>(ca.pElems, (int)ca.cElems); 822return new Span<Guid>(ca.pElems, (int)ca.cElems).ToArray(); 826Span<IntPtr> data = new(ca.pElems, (int)ca.cElems); 838Span<IntPtr> data = new(ca.pElems, (int)ca.cElems); 850Span<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)
103actualLength = deflate.TryReadAll(new Span<byte>(decompressed.Pointer, decompressed.Size));
System.Runtime.Numerics (1)
src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
35public NumberBuffer(NumberBufferKind kind, byte* digits, int digitsLength) : this(kind, new Span<byte>(digits, digitsLength))
System.Security.Cryptography (5)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
52Span<char> dest = new Span<char>((void*)handle, spanLen);
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
81return new Span<byte>(_pointer, _length);
src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
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.Cose (1)
src\libraries\Common\src\System\Memory\PointerMemoryManager.cs (1)
23return new Span<T>(_pointer, _length);
System.Security.Cryptography.Pkcs (1)
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.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 (2)
System\Windows\Forms\ActiveX\AxHost.VBFormat.cs (1)
51Span<char> buffer = new(lpBuffer, cb / sizeof(char));
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
2103Span<int> boldDates = new((int*)nmmcds->prgDayState, nmmcds->cDayState);
System.Windows.Forms.Primitives (4)
Interop\Richedit\Interop.CHARFORMAT2W.cs (1)
41get { fixed (char* c = _szFaceName) { return new Span<char>(c, (int)PInvokeCore.LF_FACESIZE); } }
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); } }
System.Windows.Forms.Primitives.Tests (2)
Interop\Ole32\CADWORDTests.cs (1)
43Span<uint> elements = new(ca.pElems, values.Length);
Interop\Ole32\CALPOLESTRTests.cs (1)
43Span<IntPtr> elements = new(ca.pElems, values.Length);