68 references to MaxLength
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System.Collections (7)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
33
Debug.Assert(Array.
MaxLength
== ArrayMaxLength);
System\Collections\Generic\PriorityQueue.cs (2)
640
if ((uint)newcapacity > Array.
MaxLength
) newcapacity = Array.
MaxLength
;
System\Collections\Generic\SortedList.cs (2)
513
if ((uint)newCapacity > Array.
MaxLength
) newCapacity = Array.
MaxLength
;
System\Collections\Generic\Stack.cs (2)
321
if ((uint)newcapacity > Array.
MaxLength
) newcapacity = Array.
MaxLength
;
System.Collections.Concurrent (2)
System\Collections\Concurrent\ConcurrentDictionary.cs (2)
2011
(newLength = HashHelpers.GetPrime(newLength)) > Array.
MaxLength
)
2013
newLength = Array.
MaxLength
;
System.Collections.Immutable (2)
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (1)
71
long maxAllowedLength = Math.Min((long)count * LengthToCountFactor, Array.
MaxLength
);
System\Collections\Frozen\String\LengthBuckets.cs (1)
32
if (arraySize > Array.
MaxLength
)
System.Collections.NonGeneric (2)
System\Collections\SortedList.cs (2)
374
if ((uint)newCapacity > Array.
MaxLength
) newCapacity = Array.
MaxLength
;
System.Diagnostics.Process (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
146
if ((uint)nextCapacity > (uint)Array.
MaxLength
)
148
nextCapacity = Math.Max(capacity + 1, Array.
MaxLength
);
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.cs (1)
245
Debug.Assert(MaxArrayLength == Array.
MaxLength
);
System.Formats.Nrbf (1)
System\Formats\Nrbf\ArrayInfo.cs (1)
20
internal static int MaxArrayLength => Array.
MaxLength
; // dynamic lookup in case the value changes in a future runtime
System.Formats.Tar (1)
System\Formats\Tar\TarHeader.Read.cs (1)
611
if ((uint)_size > (uint)Array.
MaxLength
)
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
654
maxSingleBufferSize = Array.
MaxLength
;
System.Linq (2)
System\Linq\SegmentedArrayBuilder.cs (2)
344
if (_countInFinishedSegments > Array.
MaxLength
)
354
int newSegmentLength = (int)Math.Min(Math.Max(minimumRequired, currentSegmentLength * 2L), Array.
MaxLength
);
System.Linq.Expressions (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
146
if ((uint)nextCapacity > (uint)Array.
MaxLength
)
148
nextCapacity = Math.Max(capacity + 1, Array.
MaxLength
);
System.Memory (2)
System\Buffers\ArrayMemoryPool.cs (2)
10
public sealed override int MaxBufferSize => Array.
MaxLength
;
16
else if (((uint)minimumBufferSize) > Array.
MaxLength
)
System.Net.Http (2)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System\Net\Http\HttpContent.cs (1)
928
int newBufferCapacity = (int)Math.Min((uint)lastBufferCapacity * ResizeFactor, Array.
MaxLength
);
System.Net.Quic (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System.Net.Security (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System.Net.ServerSentEvents (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System.Private.CoreLib (29)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
146
if ((uint)nextCapacity > (uint)Array.
MaxLength
)
148
nextCapacity = Math.Max(capacity + 1, Array.
MaxLength
);
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
33
Debug.Assert(Array.
MaxLength
== ArrayMaxLength);
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (2)
284
if ((uint)newCapacity > Array.
MaxLength
) newCapacity = Array.
MaxLength
;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (2)
496
if ((uint)newCapacity > Array.
MaxLength
) newCapacity = Array.
MaxLength
;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (2)
406
if ((uint)newcapacity > Array.
MaxLength
) newcapacity = Array.
MaxLength
;
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (6)
702
if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.
MaxLength
)
1181
if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.
MaxLength
)
1228
if (newLength > Array.
MaxLength
)
1230
newLength = (uint)Math.Max(Array.
MaxLength
, rentedArray.Length + 1);
1470
if (newLength > Array.
MaxLength
)
1472
newLength = (uint)Math.Max(Array.
MaxLength
, buffer.Length + 1);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (2)
148
if ((uint)(_capacity * 2) > Array.
MaxLength
)
150
newCapacity = Math.Max(value, Array.
MaxLength
);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
422
if (((ulong)length) > (ulong)Array.
MaxLength
)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (8)
689
if ((uint)newLength > Array.
MaxLength
)
691
newLength = length == Array.
MaxLength
?
692
Array.
MaxLength
+ 1 : // force OOM
693
Array.
MaxLength
;
736
if ((uint)newLength > Array.
MaxLength
)
738
newLength = length == Array.
MaxLength
?
739
Array.
MaxLength
+ 1 : // force OOM
740
Array.
MaxLength
;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (3)
552
if ((uint)minSize > Array.
MaxLength
)
562
if (newSize > Array.
MaxLength
)
564
newSize = (uint)Array.
MaxLength
;
System.Private.Uri (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
146
if ((uint)nextCapacity > (uint)Array.
MaxLength
)
148
nextCapacity = Math.Max(capacity + 1, Array.
MaxLength
);
System.Private.Xml.Linq (1)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
33
Debug.Assert(Array.
MaxLength
== ArrayMaxLength);
System.Runtime.Numerics (3)
System\Number.BigInteger.cs (2)
654
if (tmpCharCount > Array.
MaxLength
)
664
Debug.Assert(digits < Array.
MaxLength
);
System\Numerics\BigInteger.cs (1)
37
internal static int MaxLength => Array.
MaxLength
/ kcbitUint;
System.Text.Json (2)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
25
private static int ArrayMaxLength => Array.
MaxLength
;
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
244
Debug.Assert(MaxArrayLength == Array.
MaxLength
);