69 references to MaxLength
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
32
Debug.Assert(MaximumBufferSize == Array.
MaxLength
);
System.Collections (9)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (3)
63
if ((uint)newLength > Array.
MaxLength
)
65
newLength = Array.
MaxLength
<= count ? count + 1 : Array.
MaxLength
;
System\Collections\Generic\PriorityQueue.cs (2)
621
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)
1964
(newLength = HashHelpers.GetPrime(newLength)) > Array.
MaxLength
)
1966
newLength = Array.
MaxLength
;
System.Collections.Immutable (1)
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.Tar (1)
System\Formats\Tar\TarHeader.Read.cs (1)
609
if ((uint)_size > (uint)Array.
MaxLength
)
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
579
int MaxSingleBufferSize = Array.
MaxLength
;
System.Linq (2)
System\Linq\SegmentedArrayBuilder.cs (2)
322
if (_countInFinishedSegments > Array.
MaxLength
)
332
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
;
17
else if (((uint)minimumBufferSize) > Array.
MaxLength
)
System.Net.Http (2)
System\Net\Http\HttpContent.cs (2)
993
int newCapacity = twiceLength > Array.
MaxLength
?
994
Math.Max(value, Array.
MaxLength
) :
System.Private.CoreLib (31)
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 (3)
63
if ((uint)newLength > Array.
MaxLength
)
65
newLength = Array.
MaxLength
<= count ? count + 1 : Array.
MaxLength
;
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)
649
if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.
MaxLength
)
986
if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.
MaxLength
)
1033
if (newLength > Array.
MaxLength
)
1035
newLength = (uint)Math.Max(Array.
MaxLength
, rentedArray.Length + 1);
1236
if (newLength > Array.
MaxLength
)
1238
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)
690
if ((uint)newLength > Array.
MaxLength
)
692
newLength = length == Array.
MaxLength
?
693
Array.
MaxLength
+ 1 : // force OOM
694
Array.
MaxLength
;
737
if ((uint)newLength > Array.
MaxLength
)
739
newLength = length == Array.
MaxLength
?
740
Array.
MaxLength
+ 1 : // force OOM
741
Array.
MaxLength
;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (3)
549
if ((uint)minSize > Array.
MaxLength
)
559
if (newSize > Array.
MaxLength
)
561
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 (3)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (3)
63
if ((uint)newLength > Array.
MaxLength
)
65
newLength = Array.
MaxLength
<= count ? count + 1 : Array.
MaxLength
;
System.Runtime.Numerics (3)
System\Number.BigInteger.cs (2)
764
if (tmpCharCount > Array.
MaxLength
)
774
Debug.Assert(digits < Array.
MaxLength
);
System\Numerics\BigInteger.cs (1)
619
internal static int MaxLength => Array.
MaxLength
/ sizeof(uint);
System.Text.Json (2)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
32
Debug.Assert(MaximumBufferSize == Array.
MaxLength
);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
244
Debug.Assert(MaxArrayLength == Array.
MaxLength
);