4161 references to Length
aspire (3)
Aspire.Dashboard (4)
Aspire.Hosting (6)
Aspire.Playground.Tests (1)
cdac-build-tool (2)
GenerateDocumentationAndConfigFiles (19)
ILCompiler.Compiler (48)
ILCompiler.ReadyToRun (26)
ILCompiler.TypeSystem (14)
illink (14)
ILLink.RoslynAnalyzer (20)
libmscordaccore_universal (18)
Entrypoints.cs (18)
107return readFromTarget(address, bufferPtr, (uint)buffer.Length, delegateContext);
114return writeToTarget(address, bufferPtr, (uint)buffer.Length, delegateContext);
123return readThreadContext(threadId, contextFlags, (uint)buffer.Length, bufferPtr, delegateContext);
126byte* alignedBuffer = (byte*)NativeMemory.AlignedAlloc((nuint)buffer.Length, ContextAlignment);
127NativeMemory.Clear(alignedBuffer, (nuint)buffer.Length);
130int hr = readThreadContext(threadId, contextFlags, (uint)buffer.Length, alignedBuffer, delegateContext);
133new ReadOnlySpan<byte>(alignedBuffer, buffer.Length).CopyTo(buffer);
429return dataTarget.ReadVirtual(address, bufferPtr, (uint)buffer.Length, &bytesRead);
437return dataTarget.WriteVirtual(address, bufferPtr, (uint)buffer.Length, &bytesWritten);
444return dataTarget.GetThreadContext(threadId, contextFlags, (uint)bufferToFill.Length, bufferPtr);
503int hr = dataTarget.ReadVirtual(address, bufferPtr, (uint)buffer.Length, &bytesRead);
504return hr >= 0 && bytesRead != (uint)buffer.Length
516return mutableDataTarget.WriteVirtual(address, bufferPtr, (uint)buffer.Length);
525return dataTarget.GetThreadContext(threadId, contextFlags, (uint)bufferToFill.Length, bufferPtr);
528byte* alignedBuffer = (byte*)NativeMemory.AlignedAlloc((nuint)bufferToFill.Length, ContextAlignment);
529NativeMemory.Clear(alignedBuffer, (nuint)bufferToFill.Length);
535(uint)bufferToFill.Length,
539new ReadOnlySpan<byte>(alignedBuffer, bufferToFill.Length).CopyTo(bufferToFill);
Microsoft.AspNetCore.Antiforgery (10)
Microsoft.AspNetCore.Components (11)
Microsoft.AspNetCore.Components.Endpoints (10)
Microsoft.AspNetCore.Components.Forms (6)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (11)
Microsoft.AspNetCore.Components.Web (6)
Microsoft.AspNetCore.DataProtection (24)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (8)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (15)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (23)
Microsoft.AspNetCore.HttpLogging (31)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (4)
Microsoft.AspNetCore.Razor.Runtime (2)
Microsoft.AspNetCore.Razor.Utilities.Shared (10)
Microsoft.AspNetCore.Routing (14)
Microsoft.AspNetCore.Server.HttpSys (23)
_generated\78\Windows.Win32.PInvoke.HTTPAPI.dll.g.cs (2)
397 uint __result = PInvoke.HttpReceiveRequestEntityBody(RequestQueueHandleLocal, RequestId, Flags, (void* )EntityBufferLocal, (uint )EntityBuffer.Length, BytesReturnedLocal, Overlapped);
426 uint __result = PInvoke.HttpReceiveRequestEntityBody(RequestQueueHandleLocal, RequestId, Flags, (void* )EntityBufferLocal, (uint )EntityBuffer.Length, default(uint* ), Overlapped);
Microsoft.AspNetCore.Server.IIS (26)
Microsoft.AspNetCore.Server.Kestrel.Core (79)
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.WebSockets (23)
Microsoft.AspNetCore.WebUtilities (9)
Microsoft.Build (13)
Microsoft.Build.Framework (36)
Microsoft.Build.Tasks.Core (3)
Microsoft.CodeAnalysis (25)
Microsoft.CodeAnalysis.Analyzers (19)
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
Microsoft.CodeAnalysis.CodeStyle (19)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.Extensions.Package (8)
Microsoft.CodeAnalysis.Razor.Compiler (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
Microsoft.CodeAnalysis.Workspaces (26)
Microsoft.Data.Analysis (32)
Microsoft.Diagnostics.DataContractReader (4)
Microsoft.Diagnostics.DataContractReader.Contracts (17)
Microsoft.Diagnostics.DataContractReader.Legacy (24)
Microsoft.DiaSymReader (80)
Microsoft.DotNet.Cli.Utils (4)
Microsoft.DotNet.TemplateLocator (4)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (3)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (12)
Microsoft.Extensions.Configuration.EnvironmentVariables (14)
Microsoft.Extensions.DataIngestion (14)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Identity.Core (10)
Microsoft.Extensions.Logging.Abstractions (14)
Microsoft.Extensions.Logging.Console (14)
Microsoft.Extensions.Logging.Generators (12)
Microsoft.Extensions.ServiceDiscovery.Dns (7)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Tests (1)
Microsoft.ML.Core (10)
Microsoft.ML.Core.Tests (4)
Microsoft.ML.CpuMath (35)
Microsoft.ML.Data (12)
Microsoft.ML.DataView (5)
Microsoft.ML.ImageAnalytics (3)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.StandardTrainers (5)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tokenizers (132)
Microsoft.ML.Tokenizers.Tests (21)
Microsoft.ML.Transforms (6)
Microsoft.NET.Build.Containers (2)
Microsoft.NET.Build.Tasks (4)
Microsoft.Net.Http.Headers (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (4)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (9)
Microsoft.NET.Sdk.WorkloadManifestReader (4)
Microsoft.Private.Windows.Core (89)
Microsoft.Win32.Registry (8)
PresentationCore (8)
PresentationFramework (3)
ReachFramework (1)
Roslyn.Diagnostics.Analyzers (19)
Shared (3)
System.Collections (1)
System.Collections.Immutable (15)
System.Collections.Specialized (2)
System.Console (22)
System.Data.Common (8)
System.Diagnostics.DiagnosticSource (28)
System.Diagnostics.FileVersionInfo (5)
System.Diagnostics.PerformanceCounter (2)
System.Diagnostics.Process (24)
System.Diagnostics.TextWriterTraceListener (1)
System.DirectoryServices.Protocols (7)
System.Drawing.Common (14)
System.Formats.Asn1 (26)
System.Formats.Cbor (6)
System.Formats.Nrbf (1)
System.Formats.Tar (27)
System.IO.Compression (50)
System\IO\Compression\ZipBlocks.cs (7)
485int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
564int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
673Debug.Assert(blockBytes.Length == FieldLengths.FilenameLength + FieldLengths.ExtraFieldLength);
708int bytesRead = stream.ReadAtLeast(blockBytes, blockBytes.Length, throwOnEndOfStream: false);
713bytesRead = stream.ReadAtLeast(blockBytes, blockBytes.Length, throwOnEndOfStream: false);
1030Debug.Assert(bytesToRead == collatedHeader[remainingBufferLength..].Length);
1170int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
System.IO.Compression.Brotli (15)
System.IO.FileSystem.AccessControl (15)
System.IO.FileSystem.Watcher (14)
System.IO.Hashing (19)
System.IO.Packaging (2)
System.IO.Pipelines (2)
System.IO.Pipes (1)
System.IO.Ports (1)
System.Linq (18)
System.Linq.AsyncEnumerable (1)
System.Memory (15)
System.Net.Http (109)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\Helpers\VariableLengthIntegerHelper.cs (1)
154if (buffer.Length != 0)
System.Net.Http.WinHttpHandler (1)
System.Net.HttpListener (7)
System.Net.Mail (31)
System.Net.NameResolution (21)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.NetworkInformation (7)
System.Net.Ping (10)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Primitives (20)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Quic (25)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Requests (1)
System.Net.Security (47)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (11)
275Ssl.SslCtxSetCaching(sslCtx, 1, cacheSize, contextId.Length, contextId, null, null);
744outputSpan.Length,
792int drained = Ssl.BioDrainSpill(context.OutputBio!, spillPtr, spillDst.Length);
856windowSpan.Length,
888int drained = Ssl.BioDrainSpill(context.OutputBio!, spillPtr, spillDst.Length);
930int drained = Ssl.BioDrainSpill(context.OutputBio!, dstPtr, dst.Length);
951input.Length,
954output.Length,
966Debug.Assert(consumed == input.Length, "Expected all input to be consumed.");
1232while (clientList.Length > 0)
1348Debug.Assert(buffer.Length >= count);
System.Net.ServerSentEvents (3)
System.Net.Sockets (38)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System\Net\Sockets\SocketPal.Unix.cs (21)
113received = Interop.Sys.Read(handle, b, buffer.Length);
131buffer.Length,
155Count = (UIntPtr)buffer.Length
158Debug.Assert(socketAddress.Length != 0 || sockAddr == null);
162SocketAddressLen = socketAddress.Length,
414int sockAddrLen = socketAddress.Length;
498Count = (UIntPtr)buffer.Length
501Debug.Assert(socketAddress.Length != 0 || rawSocketAddress == null);
505SocketAddressLen = socketAddress.Length,
531socketAddressLen = socketAddress.Length;
580SocketAddressLen = socketAddress.Length,
603socketAddressLen = socketAddress.Length;
685if (data.Length > 0)
688err = Interop.Sys.Connectx(socket, rawSocketAddress, socketAddress.Length, data, data.Length, tfo ? 1 : 0, &sentBytes);
785else if (buffer.Length == 0)
853else if (buffer.Length == 0)
1686Debug.Assert((uint)optionLength <= optionValue.Length);
1851Interop.Error err = Interop.Sys.Select(readFDs, readFDs.Length, writeFDs, writeFDs.Length, errorFDs, errorFDs.Length, microseconds, maxFd, out triggered);
1894Debug.Assert(buffer.Length == socketList.Count);
System.Net.WebClient (6)
System.Net.WebSockets (16)
System.Numerics.Tensors (81)
System.Private.CoreLib (621)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (66)
125if (keys.Length > 1)
127IntroSort(keys, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
140int partitionSize = keys.Length;
181Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
184int hi = keys.Length - 1;
222int n = keys.Length;
260for (int i = 0; i < keys.Length - 1; i++)
289if (keys.Length > 1)
299if (nanLeft == keys.Length)
306IntroSort(keys, 2 * (BitOperations.Log2((uint)keys.Length) + 1));
416int partitionSize = keys.Length;
460Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
464ref T lastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 1);
465ref T middleRef = ref Unsafe.Add(ref zeroRef, (keys.Length - 1) >> 1);
471ref T nextToLastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 2);
511int n = keys.Length;
547for (int i = 0; i < keys.Length - 1; i++)
636Debug.Assert(0 <= i && i < keys.Length && i < values.Length);
637Debug.Assert(0 <= j && j < keys.Length && j < values.Length);
669Debug.Assert(keys.Length == values.Length);
671if (keys.Length > 1)
673IntroSort(keys, values, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
680Debug.Assert(values.Length == keys.Length);
684int partitionSize = keys.Length;
725Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
728int hi = keys.Length - 1;
766int n = keys.Length;
810for (int i = 0; i < keys.Length - 1; i++)
840if (keys.Length > 1)
850if (nanLeft == keys.Length)
858IntroSort(keys, values, 2 * (BitOperations.Log2((uint)keys.Length) + 1));
910Debug.Assert(values.Length == keys.Length);
913int partitionSize = keys.Length;
954Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
956int hi = keys.Length - 1;
1001int n = keys.Length;
1041for (int i = 0; i < keys.Length - 1; i++)
1117for (int i = 0; i < keys.Length; i++)
1127if ((uint)i < (uint)values.Length) // check to see if we have values
1194if (keys.Length > 1)
1196IntroSort(keys, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
1209int partitionSize = keys.Length;
1249Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
1252int hi = keys.Length - 1;
1290int n = keys.Length;
1328for (int i = 0; i < keys.Length - 1; i++)
1388Debug.Assert(0 <= i && i < keys.Length && i < values.Length);
1389Debug.Assert(0 <= j && j < keys.Length && j < values.Length);
1407Debug.Assert(keys.Length == values.Length);
1409if (keys.Length > 1)
1411IntroSort(keys, values, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
1418Debug.Assert(values.Length == keys.Length);
1422int partitionSize = keys.Length;
1462Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
1465int hi = keys.Length - 1;
1502int n = keys.Length;
1546for (int i = 0; i < keys.Length - 1; i++)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (7)
787actualSortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pDest, destination.Length, options);
793if ((uint)actualSortKeyLength > (uint)destination.Length)
795if (actualSortKeyLength > destination.Length)
900sortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pSortKey, sortKey.Length, options);
904if (sortKeyLength > sortKey.Length) // slow path for big strings
923sortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pSortKey, sortKey.Length, options);
929if (sortKeyLength == 0 || sortKeyLength > sortKey.Length) // internal error (0) or a bug (2nd call failed) in ucol_getSortKey
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (6)
60int actualLength = Interop.Globalization.ToAscii(flags, unicode, unicode.Length, destination, destination.Length);
62if (actualLength <= destination.Length)
104int realLen = Interop.Globalization.ToUnicode(flags, ascii, ascii.Length, output, output.Length);
110else if (realLen <= output.Length)
131int actualLength = Interop.Globalization.ToUnicode(flags, ascii, ascii.Length, destination, destination.Length);
133if (actualLength <= destination.Length)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (8)
46int length = Interop.Normaliz.IdnToAscii(flags, unicode, unicode.Length, output, output.Length);
51Debug.Assert(length == output.Length);
69if (length > destination.Length)
76int actualLength = Interop.Normaliz.IdnToAscii(flags, unicode, unicode.Length, destination, destination.Length);
120int length = Interop.Normaliz.IdnToUnicode(flags, ascii, ascii.Length, output, output.Length);
125Debug.Assert(length == output.Length);
143if (length > destination.Length)
150int actualLength = Interop.Normaliz.IdnToUnicode(flags, ascii, ascii.Length, destination, destination.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (5)
35result = Interop.Sys.ReadFromNonblocking(handle, bufPtr, buffer.Length);
40result = Interop.Sys.PRead(handle, bufPtr, buffer.Length, fileOffset);
50result = Interop.Sys.Read(handle, bufPtr, buffer.Length);
210bytesWritten = Interop.Sys.PWriteV(handle, pinnedVectors, left.Length, fileOffset);
220bytesWritten = Interop.Sys.WriteV(handle, pinnedVectors, left.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (8)
322return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
332int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
394int numElementsToConvert = Math.Min(chars.Length, bytes.Length);
424return originalBytesLength - bytes.Length; // total number of bytes written
613return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
623int written = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length, throwForDestinationOverflow: false);
682int numElementsToConvert = Math.Min(bytes.Length, chars.Length);
712return originalCharsLength - chars.Length; // total number of chars written
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (2)
202return GetChars(bytesPtr, bytes.Length, charsPtr, chars.Length, flush);
308Convert(bytesPtr, bytes.Length, charsPtr, chars.Length, flush, out bytesUsed, out charsUsed, out completed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (2)
199return GetBytes(charsPtr, chars.Length, bytesPtr, bytes.Length, flush);
307Convert(charsPtr, chars.Length, bytesPtr, bytes.Length, flush, out charsUsed, out bytesUsed, out completed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (5)
234return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
244int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
529return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
536if (bytes.Length <= chars.Length)
541charsWritten = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (11)
66outputBytesRemaining: destination.Length,
95if (destination.Length <= 2)
157outputCharsRemaining: destination.Length,
252outputCharsRemaining: destination.Length,
289if (destination.Length < bytesConsumedJustNow)
374_success = shouldAppend = destination.Length >= literalLength; // UTF8 encoding never produces fewer bytes than input characters
390_success = shouldAppend = destination.Length >= literalLength; // UTF8 encoding never produces fewer bytes than input characters
408ref MemoryMarshal.GetReference(dest), dest.Length);
689GrowAndAppendFormatted(ref this, value, utf16.Length, out charsWritten, format);
736GrowAndAppendFormatted(ref this, value, utf16.Length, out charsWritten, format);
793if (paddingNeeded <= _destination.Length - _pos)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (5)
368return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
378int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
563return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
573int written = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length, throwForDestinationOverflow: false);
661return originalCharsLength - chars.Length; // total number of chars written
System.Private.CoreLib.Generators (12)
System.Private.DataContractSerialization (15)
System.Private.Uri (50)
System.Private.Windows.Core (109)
System.Private.Windows.GdiPlus (9)
_generated\60\Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (9)
3899 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipGetImageDecoders(numDecoders, (uint )decoders.Length, (winmdroot.Graphics.GdiPlus.ImageCodecInfo* )decodersLocal);
3956 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipGetImageEncoders(numEncoders, (uint )encoders.Length, (winmdroot.Graphics.GdiPlus.ImageCodecInfo* )encodersLocal);
4840 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipGetPathTypes(pathLocal, (byte* )typesLocal, types.Length);
5346 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipGetRegionData(regionLocal, bufferLocal, (uint )buffer.Length, sizeFilledLocal);
5360 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipGetRegionData(regionLocal, bufferLocal, (uint )buffer.Length, default(uint* ));
6497 if (!points.IsEmpty && !types.IsEmpty && points.Length != types.Length) throw new ArgumentException();
6498 winmdroot.Graphics.GdiPlus.Status __result = PInvokeGdiPlus.GdipPathIterEnumerate(iteratorLocal, resultCountLocal, pointsLocal, typesLocal, (types.IsEmpty ? points.Length : types.Length));
System.Private.Xml (28)
System.Reflection.Metadata (22)
System.Runtime.InteropServices.JavaScript (4)
System.Runtime.Numerics (262)
System\Numerics\BigIntegerCalculator.DivRem.cs (49)
36Debug.Assert(quotient.Length == left.Length);
69Debug.Assert(quotient.Length == left.Length - right.Length + 1);
70Debug.Assert(remainder.Length == left.Length);
90Debug.Assert(quotient.Length == left.Length - right.Length + 1);
117Debug.Assert(remainder.Length == left.Length);
148Debug.Assert(left.Length >= 1);
150Debug.Assert(left.Length >= right.Length);
151Debug.Assert(quotient.Length == left.Length - right.Length + 1
152|| quotient.Length == 0);
155if (right.Length < DivideBurnikelZieglerThreshold || left.Length - right.Length < DivideBurnikelZieglerThreshold)
163Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer leftCopyBuffer);
166int quotientLength = quotient.Length > 0 ? 0 : left.Length - right.Length + 1;
168Span<nuint> quotientActual = quotient.Length > 0 ? quotient : quotientAllocated;
182Debug.Assert(quotient.Length == left.Length - right.Length + 1);
183Debug.Assert(remainder.Length == left.Length || remainder.Length == 0);
218Debug.Assert(src.Length + sigmaDigit <= bits.Length);
231for (int i = 0; i < bits.Length; i++)
246int t = Math.Max(2, (a.Length + n - 1) / n); // Max(2, Ceil(a.Length/n))
247Debug.Assert(t < a.Length || (t == a.Length && (nint)a[^1] >= 0));
253z.Slice(a.Length - (t - 2) * n).Clear();
256if (quotientUpper.Length < n)
262Debug.Assert(!q.Slice(quotientUpper.Length).ContainsAnyExcept(0u));
263q.Slice(0, quotientUpper.Length).CopyTo(quotientUpper);
288if (remainder.Length != 0)
291remainder.Slice(rt.Length).Clear();
301for (int i = rt.Length - 1; i >= 0; i--)
325Debug.Assert(quotient.Length == right.Length);
326Debug.Assert(remainder.Length >= right.Length + 1);
342if (quotient.Length < left.Length)
344Debug.Assert(quotient.Length + 1 == left.Length);
348DivideCore(left.Slice(0, quotient.Length), right[0], quotient, ref carry);
357if (remainder.Length != 0)
368int quotientLength = Math.Min(left.Length - right.Length + 1, quotient.Length);
373if (r1.Length < remainder.Length)
375remainder.Slice(r1.Length).Clear();
380Debug.Assert(!r1.Slice(remainder.Length).ContainsAnyExcept(0u));
381r1.Slice(0, remainder.Length).CopyTo(remainder);
393Debug.Assert(quotient.Length == right.Length);
394Debug.Assert(remainder.Length >= right.Length + 1);
419Debug.Assert(2 * quotient.Length == right.Length);
420Debug.Assert(remainder.Length >= right.Length + 1);
455Span<nuint> rr = remainder.Slice(0, d.Length + 1);
462Debug.Assert((uint)qi < (uint)quotient.Length);
473Debug.Assert(bits.Length == left.Length + right.Length);
System.Security.Cryptography (375)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.cs (2)
23NTSTATUS ntStatus = BCryptEncrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0);
44NTSTATUS ntStatus = BCryptDecrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.NCryptDeriveKeyMaterial.cs (1)
304destination.Length,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (3)
290Interop.NCrypt.NCryptEncrypt(key, input, input.Length, paddingInfo, output, output.Length, out bytesNeeded, paddingMode) :
291Interop.NCrypt.NCryptDecrypt(key, input, input.Length, paddingInfo, output, output.Length, out bytesNeeded, paddingMode);
294if (errorCode == ErrorCode.ERROR_SUCCESS && bytesNeeded > output.Length)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (22)
125int k = destination.Length;
134Span<byte> mInEM = destination.Slice(destination.Length - source.Length);
135Span<byte> ps = destination.Slice(2, destination.Length - source.Length - 3);
138destination[ps.Length + 2] = 0;
157int spaceRemain = destination.Length - len;
161len = Choose(spaceRemainSign, destination.Length, len);
271if (destination.Length - 11 < tLen)
277int paddingLength = destination.Length - tLen - 3;
303int maxInput = checked(destination.Length - hLen - hLen - 2);
325Span<byte> mDest = db.Slice(db.Length - source.Length);
326Span<byte> ps = db.Slice(hLen, db.Length - hLen - 1 - mDest.Length);
327Span<byte> psEnd = db.Slice(hLen + ps.Length, 1);
349dbMask = CryptoPool.Rent(db.Length);
350dbMaskSpan = new Span<byte>(dbMask, 0, db.Length);
410destination.Slice(0, destination.Length - emLen).Clear();
413Span<byte> em = destination.Slice(destination.Length - emLen, emLen);
557ReadOnlySpan<byte> salt = dbMask.Slice(dbMask.Length - sLen);
595while (writePtr.Length > 0)
601if (writePtr.Length >= hLen)
624tmp.Slice(0, writePtr.Length).CopyTo(writePtr);
637if (a.Length != b.Length)
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (3)
66byte[] rented = CryptoPool.Rent(output.Length);
103Interop.NCrypt.NCryptEncrypt(keyHandle, input, input.Length, null, output, output.Length, out bytesWritten, AsymmetricPaddingMode.None) :
104Interop.NCrypt.NCryptDecrypt(keyHandle, input, input.Length, null, output, output.Length, out bytesWritten, AsymmetricPaddingMode.None);
System\Security\Cryptography\LiteHash.Windows.cs (11)
137CheckStatus(Interop.BCrypt.BCryptFinishHash(dup, pDestination, destination.Length, _finishFlags));
141return destination.Length;
148CheckStatus(Interop.BCrypt.BCryptFinishHash(_hashHandle, pDestination, destination.Length, _finishFlags));
151return destination.Length;
249NTSTATUS ntStatus = Interop.BCrypt.BCryptFinishHash(_hashHandle, pDestination, destination.Length, dwFlags: 0);
256return destination.Length;
270NTSTATUS ntStatus = Interop.BCrypt.BCryptFinishHash(tmpHash, pDestination, destination.Length, dwFlags: 0);
289NTSTATUS ntStatus = Interop.BCrypt.BCryptFinishHash(_hashHandle, pDestination, destination.Length, dwFlags: BCRYPT_HASH_DONT_RESET_FLAG);
360Debug.Assert(destination.Length >= _hashSizeInBytes, $"{destination.Length} >= {_hashSizeInBytes}");
433Debug.Assert(destination.Length >= _hashSizeInBytes);
System\Security\Cryptography\RandomNumberGenerator.cs (22)
59byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
62GetBytes(array, 0, data.Length);
63new ReadOnlySpan<byte>(array, 0, data.Length).CopyTo(data);
67Array.Clear(array, 0, data.Length);
82byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
89new ReadOnlySpan<byte>(array, 0, data.Length).CopyTo(data);
93Array.Clear(array, 0, data.Length);
291int n = values.Length;
318int needed = (destination.Length + 1) >>> 1;
323if (destination.Length % 2 != 0)
335needed = destination.Length / 2;
344destination = destination.Slice(remainingRandom.Length * 2);
373if (destination.Length < randomBytes.Length)
375randomBytes = randomBytes.Slice(0, destination.Length);
380for (int i = 0; i < randomBytes.Length; i++)
385destination = destination.Slice(randomBytes.Length);
401if (destination.Length * 2 < randomBytes.Length)
403randomBytes = randomBytes.Slice(0, destination.Length * 2);
411if ((uint)i >= (uint)destination.Length)
431for (int i = 0; i < destination.Length; i++)
System.Security.Cryptography.Cose (5)
System.Security.Cryptography.Pkcs (57)
System.Security.Cryptography.ProtectedData (2)
System.Security.Cryptography.Xml (6)
System.ServiceModel.NetFramingBase (2)
System.ServiceProcess.ServiceController (15)
System.Text.Encoding.CodePages (1)
System.Text.Encodings.Web (62)
System.Text.Json (55)
System.Text.Json.SourceGeneration (20)
System.Text.RegularExpressions (49)
System.Text.RegularExpressions.Generator (45)
System.Threading.AccessControl (1)
System.Web.HttpUtility (22)
System.Windows.Forms (16)
System.Windows.Forms.Design (3)
System.Windows.Forms.Primitives (137)