1213 references to MaxValue
AssemblyStripper (1)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Cil\InstructionCollection.cs (1)
42 public readonly Instruction Outside = new Instruction (int.MaxValue, OpCodes.Nop);
http2cat (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IIS.FunctionalTests (2)
Http2TrailersResetTests.cs (1)
260Http2Utilities.VerifyGoAway(goAwayFrame, int.MaxValue, Http2ErrorCode.NO_ERROR);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IIS.LongTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
InMemory.FunctionalTests (29)
Http2\Http2ConnectionTests.cs (15)
800_clientSettings.InitialWindowSize = int.MaxValue; 805await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1029_clientSettings.InitialWindowSize = int.MaxValue; 1034await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1245_clientSettings.InitialWindowSize = int.MaxValue; 1250await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1357_clientSettings.InitialWindowSize = int.MaxValue; 1380await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1647_serviceContext.ServerOptions.Limits.Http2.MaxStreamsPerConnection = int.MaxValue; 1651Assert.Equal((uint)int.MaxValue * 2, _connection.MaxTrackedStreams); 1729expectedLastStreamId: int.MaxValue, 3575[InlineData((int)(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE), (uint)int.MaxValue + 1, (int)(Http2ErrorCode.FLOW_CONTROL_ERROR))] 4815VerifyGoAway(await ReceiveFrameAsync(), int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 4884VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR); 4914VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR);
Http2\Http2StreamTests.cs (4)
2242await WaitForConnectionErrorAsync<Exception>(ignoreNonGoAwayFrames: false, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 2592await WaitForConnectionErrorAsync<Exception>(ignoreNonGoAwayFrames: false, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 2621VerifyGoAway(goAway, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 3206await WaitForConnectionErrorAsync<HPackEncodingException>(ignoreNonGoAwayFrames: false, expectedLastStreamId: int.MaxValue, Http2ErrorCode.INTERNAL_ERROR,
Http2\Http2TimeoutTests.cs (9)
193expectedLastStreamId: int.MaxValue, 476expectedLastStreamId: int.MaxValue, 529expectedLastStreamId: int.MaxValue, 594expectedLastStreamId: int.MaxValue, 640expectedLastStreamId: int.MaxValue, 690expectedLastStreamId: int.MaxValue, 756expectedLastStreamId: int.MaxValue, 823expectedLastStreamId: int.MaxValue, 962expectedLastStreamId: int.MaxValue,
Http3\Http3StreamTests.cs (1)
2729[InlineData(int.MaxValue)]
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
1785var retryCount = !Debugger.IsAttached ? 5 : int.MaxValue;
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNode.cs (1)
36var start = int.MaxValue;
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (1)
68var start = VirtualChars.Length == 0 ? int.MaxValue : VirtualChars[0].Span.Start;
Microsoft.AspNetCore.Components (5)
Rendering\RenderBatchBuilder.cs (1)
75if (_parameterViewValidityStamp == int.MaxValue)
RenderTree\RenderTreeDiffBuilder.cs (4)
85oldSeq = int.MaxValue; 97newSeq = int.MaxValue; 434: (int.MaxValue, null); 437: (int.MaxValue, null);
Microsoft.AspNetCore.Components.Server.Tests (4)
Circuits\RenderBatchWriterTest.cs (4)
49new ArrayRange<int>(new[] { 123, int.MaxValue, int.MinValue, 456 }, 3), // Only use first 3 to show that param is respected 573, 123, int.MaxValue, int.MinValue, // DisposedComponentIds as length-prefixed array 104new RenderTreeDiff(int.MaxValue, default), 118int.MaxValue, // ComponentId
Microsoft.AspNetCore.Components.Tests (1)
RenderTreeDiffBuilderTest.cs (1)
1744tree.AddComponentParameter(1, "MyInt", int.MaxValue);
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
QueueRequestsOverwritten.cs (1)
57await Task.Delay(int.MaxValue);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
ConverterTests\JsonConverterReadTests.cs (2)
644recursionLimit: int.MaxValue, 688recursionLimit: int.MaxValue,
ConverterTests\JsonConverterWriteTests.cs (1)
274var value = new Int32Value() { Value = int.MaxValue };
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HeaderDictionaryTypeExtensionsTest.cs (2)
119context.Request.Headers.ETag = $"{int.MaxValue + 1L}"; 123Assert.Equal(int.MaxValue + 1L, result);
Microsoft.AspNetCore.HttpLogging (1)
BufferingStream.cs (1)
181private static int GetSegmentSize(int sizeHint, int maxBufferSize = int.MaxValue)
Microsoft.AspNetCore.Mvc.Core (3)
CompatibilityVersion.cs (1)
91Latest = int.MaxValue,
ModelBinding\Binders\CollectionModelBinder.cs (2)
334var limit = _maxModelBindingCollectionSize == int.MaxValue ? 335int.MaxValue :
Microsoft.AspNetCore.Mvc.Core.Test (6)
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
275{ long.MaxValue, int.MaxValue },
ModelBinding\Binders\EnumTypeModelBinderTest.cs (1)
282MaxValue = int.MaxValue
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
515MaxValue = int.MaxValue
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
547MaxValue = int.MaxValue
ModelBinding\ModelBindingHelperTest.cs (2)
994[InlineData(int.MaxValue, typeof(IntEnum?), IntEnum.MaxValue)] 1583MaxValue = int.MaxValue
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
StringLengthAttributeAdapter.cs (1)
31if (Attribute.MaximumLength != int.MaxValue)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
ModelMetadataProviderTest.cs (2)
385new DisplayAttribute { Order = int.MaxValue }, int.MaxValue
StringLengthAttributeAdapterTest.cs (1)
113var attribute = new StringLengthAttribute(int.MaxValue);
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
FormattingUtilities.cs (4)
25MaxArrayLength = int.MaxValue, 26MaxBytesPerRead = int.MaxValue, 28MaxNameTableCharCount = int.MaxValue, 29MaxStringContentLength = int.MaxValue
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
BsonTempDataSerializer.cs (1)
112if (longValue >= int.MinValue && longValue <= int.MaxValue)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (1)
47[InlineData(int.MaxValue)]
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (9)
DefaultHtmlGeneratorTest.cs (8)
868{ nameof(Model.FlagsEnum), int.MaxValue, new [] { "2147483647" } }, 869{ nameof(Model.FlagsEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } }, 881{ nameof(Model.Id), int.MaxValue, new [] { "2147483647" } }, 882{ nameof(Model.Id), (uint)int.MaxValue + 1, new [] { "2147483648" } }, // no limit checks 901{ nameof(Model.NullableEnum), int.MaxValue, new [] { "2147483647" } }, 902{ nameof(Model.NullableEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } }, 921{ nameof(Model.RegularEnum), int.MaxValue, new [] { "2147483647" } }, 922{ nameof(Model.RegularEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } },
Infrastructure\TempDataSerializerTestBase.cs (1)
47[InlineData(int.MaxValue)]
Microsoft.AspNetCore.OutputCaching (1)
RecyclableArrayBufferWriter.cs (1)
103if ((uint)newSize > int.MaxValue)
Microsoft.AspNetCore.Razor.Runtime.Test (16)
Runtime\TagHelpers\TagHelperRunnerTest.cs (16)
48new[] { 1000, int.MaxValue, 0 }, 49new[] { 0, 1000, int.MaxValue } 52new[] { int.MaxValue, int.MaxValue, int.MinValue }, 53new[] { int.MinValue, int.MaxValue, int.MaxValue } 64new[] { 0, 1000, int.MaxValue }, 65new[] { 0, 1000, int.MaxValue } 68new[] { int.MaxValue, int.MinValue, int.MaxValue, -1000, int.MaxValue, 0 }, 69new[] { int.MinValue, -1000, 0, int.MaxValue, int.MaxValue, int.MaxValue } 77new[] { 1000, int.MaxValue, 0, -1000, int.MinValue }, 78new[] { int.MinValue, -1000, 0, 1000, int.MaxValue }
Microsoft.AspNetCore.Razor.Test (1)
TagHelpers\NullHtmlEncoderTest.cs (1)
134[InlineData(int.MaxValue)]
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (2)
ResponseCachingBenchmark.cs (2)
18private static readonly string _cacheControl = $"{CacheControlHeaderValue.PublicString}, {CacheControlHeaderValue.MaxAgeString}={int.MaxValue}"; 41SizeLimit = int.MaxValue, // ~2GB
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionProvider.cs (1)
134candidates.Add(new ProviderCandidate("identity", quality, priority: int.MaxValue, provider: null));
Microsoft.AspNetCore.Routing (3)
Builder\FallbackEndpointRouteBuilderExtensions.cs (1)
79conventionBuilder.Add(b => ((RouteEndpointBuilder)b).Order = int.MaxValue);
RouteEndpointDataSource.cs (1)
133var order = isFallback ? int.MaxValue : 0;
ShortCircuit\RouteShortCircuitEndpointRouteBuilderExtensions.cs (1)
42((RouteEndpointBuilder)endpoint).Order = int.MaxValue;
Microsoft.AspNetCore.Routing.Tests (7)
Builder\FallbackEndpointRouteBuilderExtensionsTest.cs (2)
29Assert.Equal(int.MaxValue, ((RouteEndpoint)endpoint).Order); 45Assert.Equal(int.MaxValue, ((RouteEndpoint)endpoint).Order);
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (2)
749Assert.Equal(int.MaxValue, routeEndpointBuilder.Order); 767Assert.Equal(int.MaxValue, routeEndpointBuilder.Order);
Matching\DfaMatcherBuilderTest.cs (3)
2850e => Assert.Equal(int.MaxValue, e.Key)); 2862var nonRouteEndpoint = a.PolicyEdges[int.MaxValue]; 3677edges.Add(new PolicyNodeEdge(int.MaxValue, new[] { maxValueEndpoint }));
Microsoft.AspNetCore.Server.HttpSys (2)
Helpers.cs (1)
16if (size < int.MaxValue)
RequestProcessing\Response.cs (1)
317cachePolicy.SecondsToLive = (uint)Math.Min(_cacheTtl.Value.Ticks / TimeSpan.TicksPerSecond, Int32.MaxValue);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Http2Tests.cs (3)
382Http2Utilities.VerifyGoAway(goAwayFrame, int.MaxValue, Http2ErrorCode.NO_ERROR); 421Http2Utilities.VerifyGoAway(goAwayFrame, int.MaxValue, Http2ErrorCode.NO_ERROR); 461Http2Utilities.VerifyGoAway(goAwayFrame, int.MaxValue, Http2ErrorCode.NO_ERROR);
HttpsTests.cs (1)
250Assert.False(requestTimingFeature.TryGetTimestamp((HttpSysRequestTimingType)int.MaxValue, out var invalid));
ResponseCachingTests.cs (1)
164httpContext.Response.Headers["Cache-Control"] = "public, max-age=" + int.MaxValue.ToString(CultureInfo.InvariantCulture);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
Microsoft.AspNetCore.Server.IIS (2)
Core\IO\AsyncWriteOperationBase.cs (2)
28if (_buffer.Length > int.MaxValue) 30throw new InvalidOperationException($"Writes larger then {int.MaxValue} are not supported.");
Microsoft.AspNetCore.Server.Kestrel.Core (11)
Internal\Http2\Http2Connection.cs (3)
180(int)Math.Min(MaxTrackedStreams, int.MaxValue), 216_frameWriter.WriteGoAwayAsync(int.MaxValue, Http2ErrorCode.INTERNAL_ERROR).Preserve(); 1422_frameWriter.WriteGoAwayAsync(int.MaxValue, Http2ErrorCode.NO_ERROR).Preserve();
Internal\Http2\Http2FrameWriter.cs (2)
223Debug.Assert(actual <= int.MaxValue); 323await WriteGoAwayAsync(int.MaxValue, Http2ErrorCode.FLOW_CONTROL_ERROR);
Internal\Http3\Http3FrameWriter.cs (2)
76_maxTotalHeaderSize = clientPeerSettings.MaxRequestHeaderFieldSectionSize > int.MaxValue 77? int.MaxValue
Internal\Infrastructure\PipeWriterHelpers\ConcurrentPipeWriter.cs (1)
384private static int GetSegmentSize(int sizeHint, int maxBufferSize = int.MaxValue)
src\Shared\Hpack\DynamicHPackEncoder.cs (1)
32Head.Initialize(-1, string.Empty, string.Empty, 0, int.MaxValue, null);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
Systemd\KestrelServerOptionsSystemdExtensions.cs (1)
44&& listenFds <= int.MaxValue - SdListenFdsStart)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
Http1\Http1ConnectionTests.cs (1)
63_serviceContext.ServerOptions.Limits.MaxRequestHeadersTotalSize = int.MaxValue;
KestrelServerLimitsTests.cs (3)
88[InlineData(int.MaxValue)] 114[InlineData(int.MaxValue)] 142[InlineData(int.MaxValue)]
KestrelServerTests.cs (4)
217[InlineData(int.MaxValue - 1, int.MaxValue)] 243[InlineData(int.MaxValue - 1, int.MaxValue)]
src\Shared\test\Shared.Tests\runtime\Http2\HPackIntegerTest.cs (2)
87yield return new object[] { int.MaxValue, 1, new byte[] { 0x01, 0xfe, 0xff, 0xff, 0xff, 0x07 } }; 88yield return new object[] { int.MaxValue, 8, new byte[] { 0xff, 0x80, 0xfe, 0xff, 0xff, 0x07 } };
Microsoft.AspNetCore.Shared.Tests (6)
runtime\Http2\HPackIntegerTest.cs (2)
87yield return new object[] { int.MaxValue, 1, new byte[] { 0x01, 0xfe, 0xff, 0xff, 0xff, 0x07 } }; 88yield return new object[] { int.MaxValue, 8, new byte[] { 0xff, 0x80, 0xfe, 0xff, 0xff, 0x07 } };
src\Shared\Hpack\DynamicHPackEncoder.cs (1)
32Head.Initialize(-1, string.Empty, string.Empty, 0, int.MaxValue, null);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
17public const uint MaxWindowSize = int.MaxValue;
WebEncodersTests.cs (2)
16[InlineData("0123456789", Int32.MaxValue, 2)] 99[InlineData(10, Int32.MaxValue, 2)]
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
HubProtocolVersionTests.cs (3)
139["type"] = int.MaxValue 175connectionBuilder.Services.AddSingleton<IHubProtocol>(new SingleVersionHubProtocol(new VersionedJsonHubProtocol(int.MaxValue), int.MaxValue));
VersionJsonHubProtocol.cs (1)
42if ((int)o["type"] == int.MaxValue)
Microsoft.AspNetCore.SignalR.Tests (1)
DefaultTransportFactoryTests.cs (1)
21[InlineData((HttpTransportType)int.MaxValue)]
Microsoft.AspNetCore.WebUtilities.Tests (6)
FormPipeReaderTests.cs (4)
300formReader.KeyLengthLimit = int.MaxValue; 301formReader.ValueLengthLimit = int.MaxValue; 341formReader.KeyLengthLimit = int.MaxValue; 342formReader.ValueLengthLimit = int.MaxValue;
WebEncodersTests.cs (2)
13[InlineData("0123456789", Int32.MaxValue, 2)] 28[InlineData(10, Int32.MaxValue, 2)]
Microsoft.Build (7)
Collections\RetrievableEntryHashSet\HashHelpers.cs (1)
73for (int i = (min | 1); i < Int32.MaxValue; i += 2)
Evaluation\Expander.cs (2)
4640if (d >= int.MinValue && d <= int.MaxValue) 4651if (l >= int.MinValue && l <= int.MaxValue)
Graph\ParallelWorkSet.cs (1)
91_semaphore = new SemaphoreSlim(0, int.MaxValue);
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
254if (stream.CanSeek && stream.Length > int.MaxValue)
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (1)
17if (bytesCount is < 0 or > int.MaxValue)
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
260if (fileStream.Length > int.MaxValue)
Microsoft.Build.CommandLine.UnitTests (2)
XMake_Tests.cs (2)
195sa = QuotingUtilities.SplitUnquoted("abc,,;dxyz", int.MaxValue, false, false, out emptySplits, ';', ','); 202sa = QuotingUtilities.SplitUnquoted("abc,,;dxyz", int.MaxValue, true, false, out emptySplits, ';', ',');
Microsoft.Build.Engine.UnitTests (20)
BackEnd\TargetBuilder_Tests.cs (1)
1006BuildResult result = BuildSimpleProject(projectBody, new string[] { "Build" }, failTaskNumber: int.MaxValue /* no task failure needed here */);
Evaluation\Expander_Tests.cs (1)
4081new string[] {"$([System.Int32]::MaxValue)", System.Int32.MaxValue.ToString() },
Evaluation\ExpanderFunction_Tests.cs (3)
76const int expected = int.MaxValue; 93const double value = int.MaxValue + 1.0; 101const long value = int.MaxValue + 1L;
Evaluation\SimpleVersion_Tests.cs (14)
24[InlineData(int.MaxValue)] 33[InlineData(int.MaxValue, int.MaxValue)] 42[InlineData(int.MaxValue, int.MaxValue, int.MaxValue)] 58[InlineData(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue)] 221yield return new object[] { $"{prefix}2147483647.2147483647.2147483647.2147483647{suffix}", new SimpleVersion(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue) };
InternalEngineHelpers.cs (1)
63public override int Priority => int.MaxValue;
Microsoft.Build.Framework (3)
HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
NativeMethods.cs (1)
591_maxPath = isMaxPathRestricted ? MAX_PATH : int.MaxValue;
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\TaskItemSpecFilenameComparer.cs (1)
74int.MaxValue, // all characters after the start index
Copy.cs (1)
1072parallelism = int.MaxValue;
StreamMappedString.cs (1)
41private int _finalPageNumber = Int32.MaxValue;
Microsoft.Build.Tasks.UnitTests (14)
Copy_Tests.cs (1)
83private const int DefaultParallelismThreadCount = int.MaxValue;
GetInstalledSDKLocations_Tests.cs (12)
279t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString(); 326t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString(); 400t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString();
QuotingUtilities.cs (1)
170return SplitUnquoted(input, int.MaxValue, false /* discard empty splits */, false /* don't unquote the split pieces */, out emptySplits, separator);
Microsoft.Build.Utilities.UnitTests (1)
ToolTask_Tests.cs (1)
902[InlineData(int.MaxValue, false)]
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1507if (value <= int.MaxValue)
Microsoft.DotNet.Arcade.Sdk.Tests (1)
CalculateAssemblyAndFileVersionsTests.cs (1)
33[InlineData("65535.65535.65535", int.MaxValue, "65535.65535.42949.33647")]
Microsoft.DotNet.Build.Tasks.Packaging (4)
VersionUtility.cs (4)
13public static readonly Version MaxVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue);
Microsoft.DotNet.SignTool (4)
src\Hash.cs (4)
43internal static int CombineValues<T>(IEnumerable<T> values, int maxItemsToHash = int.MaxValue) 69internal static int CombineValues<T>(T[] values, int maxItemsToHash = int.MaxValue) 93internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 119internal static int CombineValues(IEnumerable<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.Extensions.Caching.Hybrid (2)
Internal\RecyclableArrayBufferWriter.cs (2)
59_maxLength = int.MaxValue; 172if ((uint)newSize > int.MaxValue)
Microsoft.Extensions.Caching.Hybrid.Tests (4)
BufferReleaseTests.cs (2)
115using (var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue)) 173using (var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue))
DistributedCacheTests.cs (2)
184var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 244var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue);
Microsoft.Extensions.Caching.MicroBenchmarks (6)
DistributedCacheBenchmarks.cs (4)
131var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 176var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 220var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 264var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue);
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (2)
59_maxLength = int.MaxValue; 172if ((uint)newSize > int.MaxValue)
Microsoft.Extensions.Logging.AzureAppServices (1)
BatchingLoggerProvider.cs (1)
92var limit = _batchSize ?? int.MaxValue;
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
560return index == -1 ? int.MaxValue : index;
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
73if (Interlocked.CompareExchange(ref _scavengeThreshold, int.MaxValue, scavengeThreshold) == scavengeThreshold)
Microsoft.VisualBasic.Core (10)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (4)
1763If result >= Integer.MinValue AndAlso result <= Integer.MaxValue Then 2077If result >= Integer.MinValue AndAlso result <= Integer.MaxValue Then 2381If result >= Integer.MinValue AndAlso result <= Integer.MaxValue Then 3022If result < Int32.MinValue OrElse result > Int32.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (4)
2862If result > Int32.MaxValue OrElse result < Int32.MinValue Then 3330If result < Int32.MinValue OrElse result > Int32.MaxValue Then 3760If result > Int32.MaxValue Then 3774If result > Int32.MaxValue OrElse result < Int32.MinValue Then
Microsoft\VisualBasic\CompilerServices\VB6File.vb (2)
611m_file.Lock(0, Int32.MaxValue) 618m_file.Unlock(0, Int32.MaxValue)
MSBuild (3)
CommandLineSwitches.cs (1)
495_parameterizedSwitches[(int)parameterizedSwitch].parameters.AddRange(QuotingUtilities.SplitUnquoted(switchParameters, int.MaxValue, false /* discard empty parameters */, unquoteParameters, out emptyParameters, s_parameterSeparators));
QuotingUtilities.cs (1)
170return SplitUnquoted(input, int.MaxValue, false /* discard empty splits */, false /* don't unquote the split pieces */, out emptySplits, separator);
XMake.cs (1)
4277var loggerTypeSpec = QuotingUtilities.SplitUnquoted(loggerSpec[0], int.MaxValue, true /* keep empty splits */, false /* keep quotes */, out _, ',');
MSBuildTaskHost (3)
Concurrent\ConcurrentDictionary.cs (2)
350_budget = int.MaxValue; 396_budget = int.MaxValue;
NativeMethods.cs (1)
591_maxPath = isMaxPathRestricted ? MAX_PATH : int.MaxValue;
Mvc.RoutingWebSite (1)
RemoveControllerActionDescriptorProvider.cs (1)
18public int Order => int.MaxValue;
PresentationBuildTasks (3)
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (2)
62if (length > (long)System.Int32.MaxValue) 64throw new ApplicationException(SR.Format(SR.ResourceTooBig, _sourcePath, System.Int32.MaxValue));
src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\Internal\Media\XamlSerializationHelper.cs (1)
444if ( !( scaledInteger <= Int32.MaxValue ) // equivalent to scaledInteger > MaxValue, but take care of NaN.
PresentationCore (43)
MS\Internal\FontCache\FontCacheUtil.cs (1)
64ArgumentOutOfRangeException.ThrowIfGreaterThan(length, int.MaxValue);
MS\Internal\FontFace\FontFamilyIdentifier.cs (1)
426return InternalGetHashCode(int.MaxValue);
MS\Internal\Generic\Span.cs (1)
432private const int MaxCch = int.MaxValue;
MS\Internal\Ink\InkSerializedFormat\Codec.cs (1)
97if ( Int32.MaxValue >= MathHelper.AbsNoThrow(llxfData) )
MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (2)
189Debug.Assert(nDataLen > 0 && nDataLen - 1 <= Int32.MaxValue); 193Debug.Assert(nDataLen <= Int32.MaxValue);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
1492maximum = Int32.MaxValue;
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (1)
325Int32.MaxValue == propertyInfo.Maximum &&
MS\Internal\IO\Packaging\NetStream.cs (1)
623if (block.Offset > (Int32.MaxValue - block.Length + 1))
MS\Internal\Media\XamlSerializationHelper.cs (1)
444if ( !( scaledInteger <= Int32.MaxValue ) // equivalent to scaledInteger > MaxValue, but take care of NaN.
MS\Internal\Shaping\OpenTypeCommon.cs (3)
694FirstChar = int.MaxValue; 695AfterLastChar = int.MaxValue; 757if (FirstChar == int.MaxValue)
MS\Internal\Shaping\OpenTypeLayout.cs (1)
137public const int InvalidOffset = int.MaxValue;
MS\Internal\Shaping\Substitution.cs (1)
266int firstLigaChar=int.MaxValue;
MS\Internal\Span.cs (1)
573_cch = int.MaxValue;
MS\Internal\TextFormatting\SimpleTextLine.cs (1)
116int widthLeft = (pap.Wrap && paragraphWidth > 0) ? paragraphWidth : int.MaxValue;
MS\Internal\TextFormatting\TextMetrics.cs (1)
212if(plsLineInfo->dvrMultiLineHeight == int.MaxValue)
System\Windows\dataobject.cs (1)
2348_current = _current + (int)Math.Min(celt, Int32.MaxValue - _current);
System\Windows\Documents\DocumentPaginator.cs (1)
98GetPage(int.MaxValue);
System\Windows\GlobalEventManager.cs (1)
438if (_globalIndexToEventMap.Count >= Int32.MaxValue)
System\Windows\Ink\StrokeCollection.cs (2)
761indexes[x] = Int32.MaxValue; 793if ( indexes[y] != Int32.MaxValue )
System\Windows\Input\Stylus\Common\StylusPointPropertyInfoDefaults.cs (11)
22Int32.MaxValue, 32Int32.MaxValue, 42Int32.MaxValue, 52Int32.MaxValue, 62Int32.MaxValue, 82Int32.MaxValue, 93Int32.MaxValue, 183Int32.MaxValue, 193Int32.MaxValue, 203Int32.MaxValue, 243Int32.MaxValue,
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
764sinceBeginning = (Int32.MaxValue - _cachedMoveStartTimestamp) + timestamp;
System\Windows\Media\Animation\RepeatBehavior.cs (1)
248return int.MaxValue - 42;
System\Windows\Media\CharacterMetricsDictionary.cs (2)
449unicodeScalar = int.MaxValue; 557if (_unicodeScalar < int.MaxValue)
System\Windows\Media\FormattedText.cs (1)
2025private int _maxLineCount = int.MaxValue;
System\Windows\Media\Generated\RenderData.cs (1)
537Debug.Assert(cbExtraData <= (uint)Int32.MaxValue);
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
300Invariant.Assert(lockBufferStride <= Int32.MaxValue);
System\Windows\Media\PathGeometry.cs (1)
263Debug.Assert(pSegmentPoly->Count <= Int32.MaxValue);
System\Windows\Media\RenderData.cs (1)
515Debug.Assert(index <= (uint)Int32.MaxValue);
PresentationFramework (69)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
371startOffset = Int32.MaxValue;
MS\Internal\AppModel\IconHelper.cs (1)
443int bestScore = int.MaxValue;
MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (1)
143protected const long MaxBufferSize = (Int32.MaxValue / 4) * 3;
MS\Internal\Documents\DocumentGridPage.cs (2)
297_documentPageView.PageNumber = int.MaxValue; 321e.PageNumber != int.MaxValue &&
MS\Internal\Documents\TextDocumentView.cs (2)
2841cpcCur = tableResult.GetCellAbove(suggestedX, int.MaxValue, int.MaxValue);
MS\Internal\PtsHost\BreakRecordTable.cs (2)
167_owner.OnPagesChanged(0, int.MaxValue/2); 200_owner.OnPagesChanged(pageStart, int.MaxValue/2);
MS\Internal\PtsHost\ListMarkerSourceInfo.cs (2)
96if (int.MaxValue - size < startIndex) 99highestIndex = int.MaxValue;
MS\Internal\PtsHost\ListParaClient.cs (2)
105if (int.MaxValue - index < indexFirstParaInSubtrack) 107adjustedIndex = int.MaxValue;
MS\Internal\PtsHost\TableParaClient.cs (3)
618int iClosestDistance = int.MaxValue; 976int iClosestDistance = int.MaxValue; 1055int iClosestDistance = int.MaxValue;
MS\Internal\PtsHost\TextParagraph.cs (1)
169fstxtprops.cMaxConsecutiveHyphens = int.MaxValue;
MS\Internal\PtsTable\RowSpanVector.cs (3)
49_entries[0].Start = int.MaxValue / 2; 50_entries[0].Range = int.MaxValue / 2; 51_entries[0].Ttl = int.MaxValue;
MS\Internal\Utility\TraceLog.cs (1)
26internal TraceLog() : this(Int32.MaxValue) {}
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (3)
78if (((uint)int.MaxValue) < size) 123private static void EnsureIndexInt32(uint index, int limit = int.MaxValue) 127if (((uint)int.MaxValue) <= index || index >= (uint)limit)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\ItemMap.cs (1)
70int keyPv = Int32.MaxValue;
System\Windows\Annotations\AnnotationService.cs (2)
745AdornerPresentationContext.SetZLevelRange(0, Int32.MaxValue / 2 + 1, Int32.MaxValue);
System\Windows\Automation\Peers\DocumentPageViewAutomationPeer.cs (1)
59else if ((owner.PageNumber >= 0) && (owner.PageNumber < int.MaxValue))
System\Windows\Controls\Grid.cs (4)
891extData.CellGroup1 = int.MaxValue; 892extData.CellGroup2 = int.MaxValue; 893extData.CellGroup3 = int.MaxValue; 894extData.CellGroup4 = int.MaxValue;
System\Windows\Controls\ItemContainerGenerator.cs (1)
2865public virtual int ContainerCount { get { return Int32.MaxValue; } }
System\Windows\Controls\Primitives\DocumentPageView.cs (1)
755(e.Count == int.MaxValue || this.PageNumber <= e.Start + e.Count))
System\Windows\Controls\TextBox.cs (4)
640Int32.MaxValue, 648[DefaultValue(Int32.MaxValue)] 1829if (MaxLines < Int32.MaxValue && this.ScrollViewer.MaxHeight != value) 1865if (MaxLines < Int32.MaxValue && RenderScope.MaxHeight != value)
System\Windows\Controls\TextRangeAdaptor.cs (1)
995int absCount = (count == int.MinValue) ? int.MaxValue : Math.Abs(count);
System\Windows\Controls\ToolTipService.cs (1)
370new FrameworkPropertyMetadata(Int32.MaxValue), // Default Value
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
793left = int.MaxValue; 794top = int.MaxValue;
System\Windows\Controls\VirtualizingStackPanel.cs (4)
2223int firstItemInViewportIndex = Int32.MinValue, lastItemInViewportIndex = Int32.MaxValue, firstItemInViewportChildIndex = Int32.MinValue, firstItemInExtendedViewportIndex = Int32.MinValue; 4030CleanupContainers(Int32.MaxValue, Int32.MaxValue, itemsControl); 12045_luThreshold = (luThreshold <= 0) ? Int32.MaxValue : luThreshold;
System\Windows\Documents\AdornerLayer.cs (1)
1010private const int DefaultZOrder = System.Int32.MaxValue;
System\windows\Documents\CaretElement.cs (3)
1121else if (value > Int32.MaxValue) 1123i = Int32.MaxValue; 1295internal const int ZOrderValue = System.Int32.MaxValue / 2;
System\Windows\Documents\DocumentSequence.cs (1)
846_paginator.NotifyPagesChanged(new PagesChangedEventArgs(PageCount, int.MaxValue));
System\Windows\Documents\FixedFlowMap.cs (2)
98internal const int FixedOrderEndPage = int.MaxValue; 100internal const int FixedOrderEndVisual = int.MaxValue;
System\Windows\Documents\FixedPage.cs (2)
588int zOrder = System.Int32.MaxValue / 2; 598al.Add(new DebugVisualAdorner(this), System.Int32.MaxValue / 4);
System\Windows\Documents\FixedTextBuilder.cs (1)
499int stopAt = Int32.MaxValue;
System\Windows\Documents\FixedTextContainer.cs (2)
348int pageNumber = int.MaxValue; 589_containerElement = new FixedElement(FixedElement.ElementType.Container, _start, _end, int.MaxValue);
System\Windows\Documents\ImmComposition.cs (2)
1842else if (value > Int32.MaxValue) 1844i = Int32.MaxValue;
System\Windows\Documents\List.cs (1)
203if (itemIndex < int.MaxValue)
System\Windows\Documents\Speller.cs (1)
1261leftWordBreak = Int32.MaxValue;
System\Windows\Input\KeyboardNavigation.cs (4)
193new FrameworkPropertyMetadata(Int32.MaxValue)); 2165int maxIndexFirstTab = Int32.MaxValue; 2207int maxIndexFirstTab = Int32.MaxValue; 2208int maxIndex = Int32.MaxValue;
System\Windows\Standard\Utilities.cs (1)
174int bestScore = int.MaxValue;
System\Windows\Window.cs (2)
5602((l > Int32.MaxValue) || (l < Int32.MinValue))) 5618if ((length > Int32.MaxValue) ||
ReachFramework (7)
AlphaFlattener\BrushProxy.cs (3)
4254_right = Int32.MaxValue; 4504else if (v > System.Int32.MaxValue) 4506return System.Int32.MaxValue;
AlphaFlattener\Optimizer.cs (1)
40m_lowestPrimitive = int.MaxValue;
MS\Internal\Printing\MostFrequentlyUsedCache.cs (1)
66int minUseCount = int.MaxValue;
PrintConfig\PTProvider.cs (2)
826return (int)Math.Max(0, Math.Min(value, int.MaxValue)); 831return (int)Math.Min(value, int.MaxValue);
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
65[InlineData((long)int.MaxValue + 1, false)]
System.Collections (4)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
67for (int i = (min | 1); i < int.MaxValue; i += 2) 103Debug.Assert(divisor <= int.MaxValue);
System\Collections\BitArray.cs (2)
80if (bytes.Length > int.MaxValue / BitsPerByte) 202if (values.Length > int.MaxValue / BitsPerInt32)
System.Collections.Concurrent (17)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
67for (int i = (min | 1); i < int.MaxValue; i += 2) 103Debug.Assert(divisor <= int.MaxValue);
System\Collections\Concurrent\BlockingCollection.cs (8)
323/// <see cref="int.MaxValue"/>.</exception> 573/// <see cref="int.MaxValue"/>.</exception> 858/// <see cref="int.MaxValue"/>.</exception> 1102if (elapsedMilliseconds > int.MaxValue) 1217/// <see cref="int.MaxValue"/>.</exception> 1699if ((totalMilliseconds < 0 || totalMilliseconds > int.MaxValue) && (totalMilliseconds != Timeout.Infinite)) 1702SR.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue)); 1716SR.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue));
System\Collections\Concurrent\ConcurrentBag.cs (2)
670int.MaxValue; // in debug builds, start at the end so we exercise the index reset logic 734if (tail == int.MaxValue)
System\Collections\Concurrent\ConcurrentDictionary.cs (5)
769Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 784Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 799Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 1956_budget = int.MaxValue; 1973_budget = int.MaxValue;
System.Collections.Immutable (4)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
67for (int i = (min | 1); i < int.MaxValue; i += 2) 103Debug.Assert(divisor <= int.MaxValue);
System\Collections\Frozen\FrozenDictionary.cs (1)
163int minLength = int.MaxValue, maxLength = 0;
System\Collections\Frozen\FrozenSet.cs (1)
111int minLength = int.MaxValue, maxLength = 0;
System.ComponentModel.TypeConverter (3)
System\Timers\Timer.cs (3)
47/// The time, in milliseconds, between events. The value must be greater than zero and less than or equal to <see cref="int.MaxValue"/>. 57if (roundedInterval > int.MaxValue || roundedInterval <= 0) 69/// The time between events. The value in milliseconds must be greater than zero and less than or equal to <see cref="int.MaxValue"/>.
System.Console (1)
System\TerminalFormatStrings.cs (1)
165MinKeyFormatLength = int.MaxValue;
System.Data.Common (13)
System\Data\Common\DataRecordInternal.cs (2)
117if (dataIndex > int.MaxValue) 187if (dataIndex > int.MaxValue)
System\Data\Common\DataStorage.cs (1)
240return int.MaxValue;
System\Data\Common\Int32Storage.cs (1)
105int min = int.MaxValue;
System\Data\DataTable.cs (1)
43/// <remarks>This limits <see cref="DataRowCollection.Add(DataRow)"/> to <see cref="int.MaxValue"/> operations.</remarks>
System\Data\SQLTypes\SQLBytes.cs (1)
51private const long x_lMaxLen = int.MaxValue;
System\Data\SQLTypes\SQLChars.cs (1)
45private const long x_lMaxLen = int.MaxValue;
System\Data\SQLTypes\SQLInt32.cs (6)
26private const long s_lBitNotIntMax = ~int.MaxValue; 215if (value > int.MaxValue || value < int.MinValue) 228if (value > int.MaxValue || value < int.MinValue) 241if (value > int.MaxValue || value < int.MinValue) 265if (x._bLen > 1 || ret > int.MaxValue || ret < int.MinValue) 542public static readonly SqlInt32 MaxValue = new SqlInt32(int.MaxValue);
System.Diagnostics.Process (4)
System\Diagnostics\Process.cs (2)
821return WaitForInputIdle(int.MaxValue); 1450ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\Diagnostics\Process.Linux.cs (2)
227if (rsslim > int.MaxValue) 228rsslim = int.MaxValue;
System.Formats.Asn1 (5)
System\Formats\Asn1\Asn1Tag.cs (1)
225if (tagValue > int.MaxValue)
System\Formats\Asn1\AsnDecoder.cs (2)
428if (parsedLength > int.MaxValue) 630value <= int.MaxValue &&
System\Formats\Asn1\AsnDecoder.Integer.cs (2)
154/// <see cref="int.MinValue"/> and <see cref="int.MaxValue"/>, inclusive; otherwise, 603/// <see cref="int.MinValue"/> and <see cref="int.MaxValue"/>, inclusive; otherwise
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.Map.cs (1)
66if (definiteLength < 0 || definiteLength > int.MaxValue / 2)
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
786if (_compressedSize > int.MaxValue)
System.IO.Compression.Brotli (3)
System\IO\Compression\BrotliUtils.cs (1)
14public const int MaxInputSize = int.MaxValue - 515; // 515 is the max compressed extra bytes
System\IO\Compression\enc\BrotliEncoder.cs (2)
106/// <param name="inputSize">The input size to get the maximum expected compressed length from. Must be greater or equal than 0 and less or equal than <see cref="int.MaxValue" /> - 515.</param> 109/// <exception cref="System.ArgumentOutOfRangeException"><paramref name="inputSize" /> is less than 0, the minimum allowed input size, or greater than <see cref="int.MaxValue" /> - 515, the maximum allowed input size.</exception>
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
630ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System.IO.Pipelines (2)
System\IO\Pipelines\Pipe.cs (1)
259private int GetSegmentSize(int sizeHint, int maxBufferSize = int.MaxValue)
System\IO\Pipelines\StreamPipeWriter.cs (1)
175private int GetSegmentSize(int sizeHint, int maxBufferSize = int.MaxValue)
System.IO.Pipes (3)
System\IO\Pipes\NamedPipeClientStream.cs (1)
208ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\IO\Pipes\NamedPipeServerStream.Unix.cs (2)
45(maxNumberOfServerInstances == MaxAllowedServerInstances) ? int.MaxValue : maxNumberOfServerInstances, options); 331socket.Listen(int.MaxValue);
System.Linq (11)
System\Linq\Concat.cs (1)
158if (_headIndex == int.MaxValue - 2)
System\Linq\OrderedEnumerable.SpeedOpt.cs (1)
140public override Iterator<TElement> Skip(int count) => new SkipTakeOrderedIterator<TElement>(this, count, int.MaxValue);
System\Linq\Range.cs (1)
17if (count < 0 || max > int.MaxValue)
System\Linq\Select.SpeedOpt.cs (4)
190return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 240Debug.Assert((uint)(end - start) <= (uint)int.MaxValue); 413return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 516return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue);
System\Linq\Skip.SpeedOpt.cs (1)
12(IEnumerable<TSource>)new IListSkipTakeIterator<TSource>(sourceList, count, int.MaxValue) :
System\Linq\SkipTake.SpeedOpt.cs (2)
219Debug.Assert(maxIndexInclusive == -1 || (maxIndexInclusive - minIndexInclusive < int.MaxValue), $"{nameof(Limit)} will overflow!"); 273Debug.Assert(count != (uint)int.MaxValue + 1 || _minIndexInclusive > 0, "Our return value will be incorrect.");
System\Linq\Union.cs (1)
271if (_headIndex == int.MaxValue - 2)
System.Linq.Expressions (6)
System\Linq\Expressions\Compiler\ILGen.cs (2)
981int scale = (bits[3] & int.MaxValue) >> 16; 986if (value <= int.MaxValue)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
297if (jumpTableSlots > int.MaxValue)
System\Linq\Expressions\Interpreter\Instruction.cs (1)
10public const int UnknownInstrIndex = int.MaxValue;
System\Linq\Expressions\Interpreter\Interpreter.cs (1)
21internal const int RethrowOnReturn = int.MaxValue;
System\Linq\Expressions\Interpreter\LocalVariables.cs (1)
172public int Stop = int.MaxValue;
System.Linq.Parallel (15)
System\Linq\ParallelEnumerable.cs (15)
415/// <paramref name="start"/> + <paramref name="count"/> - 1 is larger than <see cref="int.MaxValue"/>. 419if (count < 0 || (count > 0 && int.MaxValue - (count - 1) < start)) throw new ArgumentOutOfRangeException(nameof(count)); 1841/// The number of elements in source is larger than <see cref="int.MaxValue"/>. 1883/// The number of elements in source is larger than <see cref="int.MaxValue"/>. 1979/// The sum is larger than <see cref="int.MaxValue"/>. 2002/// The sum is larger than <see cref="int.MaxValue"/>. 2203/// The sum is larger than <see cref="int.MaxValue"/>. 2227/// The sum is larger than <see cref="int.MaxValue"/>. 3478/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3501/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3527/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3550/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3714/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3738/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>. 3765/// The sum or count of the elements in the sequence is larger than <see cref="int.MaxValue"/>.
System.Memory (9)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
223if ((uint)newSize > int.MaxValue)
System\Buffers\ReadOnlySequence.cs (3)
334Debug.Assert(start <= int.MaxValue - startIndex); 417Debug.Assert(length <= int.MaxValue - sliceStartIndex); 501if (Length < int.MaxValue)
System\Buffers\ReadOnlySequence.Helpers.cs (2)
575Debug.Assert(start <= int.MaxValue); 576Debug.Assert(end <= int.MaxValue);
System\Buffers\SequenceReader.cs (1)
153Debug.Assert(offset <= int.MaxValue);
System\Text\EncodingExtensions.cs (2)
189totalByteCount = int.MaxValue; 376totalCharCount = int.MaxValue;
System.Memory.Data (3)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (2)
53if (value < 0 || value > int.MaxValue) 71if (pos > int.MaxValue)
System\BinaryData.cs (1)
305if (longLength > int.MaxValue || longLength < 0)
System.Net.Http (26)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (2)
53if (value < 0 || value > int.MaxValue) 71if (pos > int.MaxValue)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (2)
308Debug.Assert(start <= int.MaxValue); 309Debug.Assert(length <= int.MaxValue);
System\Net\Http\GlobalHttpSettings.cs (2)
91int.MaxValue); 96value = int.MaxValue;
System\Net\Http\Headers\AltSvcHeaderParser.cs (1)
452if (portTmp > int.MaxValue)
System\Net\Http\Headers\RetryConditionHeaderValue.cs (1)
31ArgumentOutOfRangeException.ThrowIfGreaterThan(delta.TotalSeconds, int.MaxValue);
System\Net\Http\HttpClient.cs (2)
20private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue); 129Debug.Assert(HttpContent.MaxBufferSize <= int.MaxValue);
System\Net\Http\HttpContent.cs (1)
24internal const int MaxBufferSize = int.MaxValue;
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (2)
263if (ReadChunkFromConnectionBuffer(int.MaxValue, ctr) is not ReadOnlyMemory<byte> bytesRead || bytesRead.Length == 0) 482if (ReadChunkFromConnectionBuffer(int.MaxValue, ctr) is not ReadOnlyMemory<byte> bytesRead || bytesRead.Length == 0)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
150_maxHttp11Connections = int.MaxValue;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (2)
200ReadFromConnectionBuffer(int.MaxValue); 232ReadFromConnectionBuffer(int.MaxValue);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (4)
76private const int MaxStreamId = int.MaxValue; 177return (long)(milliseconds > int.MaxValue ? int.MaxValue : milliseconds); 898ChangeMaxConcurrentStreams(int.MaxValue);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
77_headerDecoder = new QPackDecoder(maxHeadersLength: (int)Math.Min(int.MaxValue, _headerBudgetRemaining));
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
73settings._maxConnectionsPerServer == int.MaxValue &&
System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs (1)
139public int MaxResponseHeadersByteLength => (int)Math.Min(int.MaxValue, _maxResponseHeadersLength * 1024L);
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (3)
175(value.TotalMilliseconds > int.MaxValue)) 244(value.TotalMilliseconds > int.MaxValue)) 260(value.TotalMilliseconds > int.MaxValue))
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
121Debug.Assert(client.MaxResponseContentBufferSize is > 0 and <= int.MaxValue);
System.Net.Ping (3)
System\Net\NetworkInformation\Ping.cs (3)
442/// <exception cref="ArgumentOutOfRangeException"><paramref name="timeout"/> represents a time less than zero milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.</exception> 474/// <exception cref="ArgumentOutOfRangeException"><paramref name="timeout"/> represents a time less than zero milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.</exception> 660ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System.Net.Primitives (3)
System\Net\CookieContainer.cs (3)
122if (perDomainCapacity != int.MaxValue && (perDomainCapacity <= 0 || perDomainCapacity > capacity)) 148if (value <= 0 || (value < m_maxCookiesPerDomain && m_maxCookiesPerDomain != int.MaxValue)) 197if (value != int.MaxValue)
System.Net.Quic (2)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (2)
308Debug.Assert(start <= int.MaxValue); 309Debug.Assert(length <= int.MaxValue);
System.Net.Requests (1)
System\Net\TimerThread.cs (1)
549Math.Min(unchecked((uint)(nextTick - newNow)), (uint)(int.MaxValue - TickCountResolution)) + TickCountResolution :
System.Net.Security (3)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
60CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
System\Net\Security\SslStream.IO.cs (2)
30private const int UnknownTlsFrameLength = int.MaxValue; // frame too short to determine length 742if (frameSize == int.MaxValue && _buffer.EncryptedLength > TlsFrameHelper.HeaderSize)
System.Net.Sockets (6)
System\Net\Sockets\NetworkStream.cs (2)
351/// <exception cref="ArgumentOutOfRangeException"><paramref name="timeout"/> is less than -1 milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.</exception> 365ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\Net\Sockets\Socket.cs (2)
965public void Listen() => Listen(int.MaxValue); 2322ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMicroseconds, int.MaxValue, nameof(timeout));
System\Net\Sockets\SocketPal.Unix.cs (2)
380int available = int.MaxValue; 393available = int.MaxValue;
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
837if (contentLength > int.MaxValue) 884if (contentLength > int.MaxValue)
System.Numerics.Tensors (9)
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (3)
64Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 89Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 114Vector512<uint> sign = x.AsUInt32() & Vector512.Create(~(uint)int.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (3)
71Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 93Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 115Vector512<uint> sign = x.AsUInt32() & Vector512.Create(~(uint)int.MaxValue);
System\Numerics\Tensors\netcore\TensorSpanHelpers.T.cs (3)
43nuint toClear = Math.Min(len, int.MaxValue); 54nuint toFill = Math.Min(numElements, int.MaxValue); 66nuint toCompare = Math.Min(length, int.MaxValue);
System.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
41threshold = dictionaryCreationThreshold == -1 ? int.MaxValue : dictionaryCreationThreshold;
System.Private.CoreLib (182)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
194exp = int.MaxValue;
src\libraries\Common\src\System\TimeProvider.cs (1)
139/// <exception cref="ArgumentOutOfRangeException">The number of milliseconds in the value of <paramref name="dueTime"/> or <paramref name="period"/> is negative and not equal to <see cref="Timeout.Infinite"/>, or is greater than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
188ArgumentOutOfRangeException.ThrowIfGreaterThan(assemblyByteLength, int.MaxValue);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
171return h < 0 || h > int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (1)
804ArgumentOutOfRangeException.ThrowIfGreaterThan(length, int.MaxValue / 3);
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (2)
507int.MaxValue; // no limit other than processor count 544if (tempResult is >= 0 and <= int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Decoder.cs (1)
128Debug.Assert(destLength < (int.MaxValue / 4 * 3));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Encoder.cs (1)
742private const int MaximumEncodeLength = (int.MaxValue / 4) * 3; // 1610612733
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.D.cs (2)
309if (answer > int.MaxValue / 10) 314if ((uint)answer > (uint)int.MaxValue + (-1 * sign + 1) / 2)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.N.cs (2)
243if (((uint)answer) > int.MaxValue / 10) 250if ((uint)answer > (uint)int.MaxValue + (-1 * sign + 1) / 2)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Number.cs (2)
303if (number.Scale > int.MaxValue - (long)absoluteExponent) 308number.Scale = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
67for (int i = (min | 1); i < int.MaxValue; i += 2) 103Debug.Assert(divisor <= int.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (1)
271if (rawsize > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (7)
1038if (value < int.MinValue || value > int.MaxValue) ThrowInt32OverflowException(); 1045if (value > int.MaxValue) ThrowInt32OverflowException(); 2630if (outlen > int.MaxValue) 3075ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 3094else if (source.Length > int.MaxValue / 2 || destination.Length > source.Length * 2) 3152ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 3171else if (source.Length > int.MaxValue / 2 || destination.Length > source.Length * 2)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1766int actualResult = (value >= int.MaxValue) ? int.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
2284if (tmp64 > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (2)
279int sleepDurationInMilliseconds = int.MaxValue; 301if (sleepDurationInMilliseconds == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
127if ((long)uint64Value < int.MinValue || (long)uint64Value > int.MaxValue) return null;
src\libraries\System.Private.CoreLib\src\System\Environment.OSVersion.Unix.cs (1)
53return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1567return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (18)
633static int IMinMaxValue<int>.MaxValue => MaxValue; 1009result = (actualValue >= MaxValue) ? MaxValue : 1016result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1029result = (actualValue >= MaxValue) ? MaxValue : 1036result = (actualValue >= MaxValue) ? MaxValue : 1043result = (actualValue >= MaxValue) ? MaxValue : 1056result = (actualValue >= MaxValue) ? MaxValue : 1087result = (actualValue >= MaxValue) ? MaxValue : 1094result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1131result = (actualValue >= MaxValue) ? MaxValue : 1447static int IBinaryIntegerParseAndFormatInfo<int>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\IO\EnumerationOptions.cs (3)
14internal const int DefaultMaxRecursionDepth = int.MaxValue; 83/// <value>A number that represents the maximum directory depth to recurse while enumerating. The default value is <see cref="int.MaxValue" />.</value> 84/// <remarks>If <see cref="MaxRecursionDepth" /> is set to a negative number, the default value <see cref="int.MaxValue" /> is used.
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
37private const int MemStreamMaxLength = int.MaxValue; 549if (value < 0 || value > int.MaxValue) 555Debug.Assert(MemStreamMaxLength == int.MaxValue); // Check parameter validation logic in this method if this fails. 556if (value > (int.MaxValue - _origin))
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
865/// <exception cref="ArgumentOutOfRangeException">The number of characters in the next line is larger than <see cref="int.MaxValue"/>.</exception> 997/// <exception cref="ArgumentOutOfRangeException">The number of characters is larger than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (2)
225/// <exception cref="ArgumentOutOfRangeException">The number of characters in the next line is larger than <see cref="int.MaxValue"/>.</exception> 263/// <exception cref="ArgumentOutOfRangeException">The number of characters is larger than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (2)
207/// <exception cref="ArgumentOutOfRangeException">The number of characters in the next line is larger than <see cref="int.MaxValue"/>.</exception> 233/// <exception cref="ArgumentOutOfRangeException">The number of characters is larger than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (1)
77Debug.Assert(ucount <= int.MaxValue); // this should fit into a signed int
src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
858return int.MaxValue; 1606private const double Int32MaxValueOffset = (double)int.MaxValue + 1;
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
209return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
58/// <returns>A 32-bit signed integer that is greater than or equal to 0 and less than <see cref="int.MaxValue"/>.</returns> 62AssertInRange(result, 0, int.MaxValue); 388AssertInRange(result, 0, int.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Random.Net5CompatImpl.cs (10)
33return range <= int.MaxValue ? 147return range <= int.MaxValue ? 264int subtraction = (seed == int.MinValue) ? int.MaxValue : Math.Abs(seed); 282mk += int.MaxValue; 301seedArray[i] += int.MaxValue; 313InternalSample() * (1.0 / int.MaxValue); 342if (retVal == int.MaxValue) 348retVal += int.MaxValue; 371d += int.MaxValue - 1; // get a number in range [0..2*int.MaxValue-1) 372d /= 2u * int.MaxValue - 1;
src\libraries\System.Private.CoreLib\src\System\Random.Xoshiro256StarStarImpl.cs (1)
84if (result != int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (2)
507int hashCode = RuntimeHelpers.GetHashCode(key) & int.MaxValue; 551hashCode &= int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
632int arraySize = (int)Math.Clamp(newCapacity, MinimumArrayPoolLength, int.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
252/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception> 262/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1701int actualResult = (value >= int.MaxValue) ? int.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (2)
112if (int.MaxValue > _count) 114newSize = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
44int minimumLength = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (2)
385int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue; 452minLength = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
455const int Length = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (1)
534const int length = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (11)
220if (totalLength > int.MaxValue) 258if (totalLength > int.MaxValue) 403if (totalLengthLong > int.MaxValue) 1030if (totalSeparatorsLength > int.MaxValue) 1414if (dstLength > int.MaxValue) 1636return SplitInternal(new ReadOnlySpan<char>(in separator), int.MaxValue, options); 1655return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1665return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1686return SplitInternal(separator, int.MaxValue, options); 1738return SplitInternal(separator ?? Empty, null, int.MaxValue, options); 1748return SplitInternal(null, separator, int.MaxValue, options);
src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
125if (_fallbackCount == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (1)
90if (_iCount == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (1)
153if (_fallbackCount == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (8)
167/// If the byte count would be greater than <see cref="int.MaxValue"/>. 221/// If the resulting byte count is greater than <see cref="int.MaxValue"/>. 252/// If the return value would exceed <see cref="int.MaxValue"/>. 307/// If the resulting byte count is greater than <see cref="int.MaxValue"/>. 762/// If the char count would be greater than <see cref="int.MaxValue"/>. 815/// If the resulting char count is greater than <see cref="int.MaxValue"/>. 846/// If the return value would exceed <see cref="int.MaxValue"/>. 907/// If the resulting char count is greater than <see cref="int.MaxValue"/>.
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (5)
78m_MaxCapacity = int.MaxValue; 87: this(capacity, int.MaxValue) 130m_MaxCapacity = int.MaxValue; 172int persistedMaxCapacity = int.MaxValue; 956Debug.Assert(insertingChars + this.Length < int.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
242if ((ulong)totalUtf8Bytes > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.Sealed.cs (2)
81if ((uint)charCount > (int.MaxValue / MaxUtf8BytesPerChar) - 1) 103if ((uint)byteCount > int.MaxValue - 1)
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
220/// than <code>-1</code> milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (4)
390/// than <see cref="int.MaxValue"/>.</exception> 402ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout)); 421/// than <see cref="int.MaxValue"/>.</exception> 435ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
39t_currentProcessorIdCache = ((currentProcessorId << ProcessorIdCacheShift) & int.MaxValue) | s_processorIdRefreshRate;
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (1)
242ArgumentOutOfRangeException.ThrowIfGreaterThan(ltm, int.MaxValue, nameof(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (8)
66private const int NO_MAXIMUM = int.MaxValue; 209/// than <see cref="int.MaxValue"/>.</exception> 215if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 239/// than <see cref="int.MaxValue"/>.</exception> 246if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 540/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 564/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 570if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (3)
220/// than <see cref="int.MaxValue"/> milliseconds. 226if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 314int turn = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Threading\SpinWait.cs (3)
234_count = (_count == int.MaxValue ? YieldThreshold : _count + 1); 278/// <see cref="int.MaxValue"/>.</exception> 283if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (2)
118if (m_maxConcurrencyLevel == UNLIMITED_PROCESSING) m_maxConcurrencyLevel = int.MaxValue; 119if (m_maxItemsPerTask == UNLIMITED_PROCESSING) m_maxItemsPerTask = int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
2650/// <see cref="int.MaxValue"/>. 2671/// <see cref="int.MaxValue"/>. 2679if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 4740/// <see cref="int.MaxValue"/>. 4747if (totalMilliseconds is < -1 or > int.MaxValue) 5164/// <see cref="int.MaxValue"/>. 5170if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
150public virtual int MaximumConcurrencyLevel => int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
552return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (10)
96private const int START_INDEX = int.MaxValue; 111if (tail == int.MaxValue) 168if (tail == int.MaxValue) 437int minCount = int.MaxValue; 1383if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1400if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1447ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1463ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1481ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, int.MaxValue, nameof(timeout)); 1500ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, int.MaxValue, nameof(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\TimeoutHelper.cs (1)
38if (elapsedMilliseconds > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\TimerQueue.Portable.cs (2)
90shortestWaitDurationMs = int.MaxValue; 127if (shortestWaitDurationMs == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
83ArgumentOutOfRangeException.ThrowIfGreaterThan(timeoutMilliseconds, int.MaxValue, nameof(timeout));
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1899int actualResult = (value >= new UInt128(0x0000_0000_0000_0000, 0x0000_0000_7FFF_FFFF)) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
1053int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1052int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1071int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\System\GC.CoreCLR.cs (2)
141ArgumentOutOfRangeException.ThrowIfGreaterThan(bytesAllocated, int.MaxValue); 152ArgumentOutOfRangeException.ThrowIfGreaterThan(bytesAllocated, int.MaxValue);
System.Private.DataContractSerialization (49)
System\Runtime\Serialization\DataContract.cs (2)
407int newSize = (nextId < int.MaxValue / 2) ? nextId * 2 : int.MaxValue;
System\Runtime\Serialization\DataContractSerializer.cs (3)
72: this(type, knownTypes, int.MaxValue, false, false) 90Initialize(type, dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), knownTypes, int.MaxValue, ignoreExtensionDataObject, preserveObjectReferences, null, false); 100Initialize(type, rootName, rootNamespace, knownTypes, int.MaxValue, false, false, null, false);
System\Runtime\Serialization\DataContractSerializerSettings.cs (1)
15private int _maxItemsInObjectGraph = int.MaxValue;
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (2)
63: this(type, null, knownTypes, int.MaxValue, false, false) 77: this(type, rootName, knownTypes, int.MaxValue, false, false)
System\Runtime\Serialization\Json\DataContractJsonSerializerSettings.cs (1)
15private int _maxItemsInObjectGraph = int.MaxValue;
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
201int newSize = (nextId < int.MaxValue / 2) ? nextId * 2 : int.MaxValue;
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (2)
677object forLoop = _ilg.For(i, 0, int.MaxValue); 874object forLoop = _ilg.For(i, 0, int.MaxValue);
System\Runtime\Serialization\SchemaImporter.cs (1)
372if (i == int.MaxValue)
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
708object forLoop = _ilg.For(i, 0, int.MaxValue); 807object forLoop = _ilg.For(i, 0, int.MaxValue);
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (4)
455if (index == int.MaxValue) 458SR.Format(SR.MaxArrayLengthExceeded, int.MaxValue, 461int newSize = (index < int.MaxValue / 2) ? index * 2 : int.MaxValue;
System\Text\Base64Encoding.cs (2)
247if (byteCount < 0 || byteCount > int.MaxValue / 4 * 3 - 2) 248throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.ValueMustBeInRange, 0, int.MaxValue / 4 * 3 - 2));
System\Text\BinHexEncoding.cs (2)
53if (byteCount < 0 || byteCount > int.MaxValue / 2) 54throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.ValueMustBeInRange, 0, int.MaxValue / 2));
System\Xml\ValueHandle.cs (2)
240if (value >= int.MinValue && value <= int.MaxValue) 248if (value <= int.MaxValue)
System\Xml\XmlBinaryReader.cs (1)
343if (totalLength > int.MaxValue - actual)
System\Xml\XmlBinaryWriterSession.cs (1)
198if (++_now == int.MaxValue)
System\Xml\XmlBufferReader.cs (3)
214Debug.Assert(_offset <= int.MaxValue - count); 274if (windowOffset > int.MaxValue - windowLength) 275windowLength = int.MaxValue - windowOffset;
System\Xml\XmlCanonicalWriter.cs (6)
363if (prefix.Length > int.MaxValue - ns.Length) 364throw new ArgumentOutOfRangeException(nameof(ns), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue / maxBytesPerChar)); 366if (totalLength > int.MaxValue / maxBytesPerChar) 367throw new ArgumentOutOfRangeException(nameof(ns), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue / maxBytesPerChar)); 399if (prefixLength > int.MaxValue - nsLength) 400throw new ArgumentOutOfRangeException(nameof(nsLength), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue));
System\Xml\XmlConverter.cs (4)
496if (value > int.MaxValue / 10) 499if (value > int.MaxValue - digit) 688while (value > int.MaxValue) 706Debug.Assert(value >= int.MinValue && value <= int.MaxValue);
System\Xml\XmlDictionaryReader.cs (2)
138return CreateMtomReader(stream, encodings, contentType, quotas, int.MaxValue, null); 161return CreateMtomReader(buffer, offset, count, encodings, contentType, quotas, int.MaxValue, null);
System\Xml\XmlDictionaryReaderQuotas.cs (5)
34private static readonly XmlDictionaryReaderQuotas s_maxQuota = new XmlDictionaryReaderQuotas(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue,
System\Xml\XmlDictionaryString.cs (1)
16internal const int MaxKey = int.MaxValue / 4;
System.Private.Xml (34)
System\Xml\Cache\XPathDocumentNavigator.cs (1)
886_ => int.MaxValue,
System\Xml\Dom\DocumentXPathNavigator.cs (1)
468int index = int.MaxValue;
System\Xml\Dom\XPathNodeList.cs (1)
30ReadUntil(int.MaxValue);
System\Xml\HWStack.cs (1)
17internal HWStack(int GrowthRate) : this(GrowthRate, int.MaxValue) { }
System\Xml\Schema\DataTypeImplementation.cs (1)
3267private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(int.MinValue, int.MaxValue);
System\Xml\Schema\Parser.cs (2)
72_markupDepth = int.MaxValue; 254_markupDepth = int.MaxValue;
System\Xml\Schema\ParserAsync.cs (1)
32_markupDepth = int.MaxValue;
System\Xml\Schema\XmlValueConverter.cs (2)
802if (value < (decimal)int.MinValue || value > (decimal)int.MaxValue) 858if (value < (long)int.MinValue || value > (long)int.MaxValue)
System\Xml\Schema\XsdDuration.cs (1)
653if (result > (int.MaxValue - digit) / 10)
System\Xml\Serialization\Types.cs (1)
438int leastDerivedLevel = int.MaxValue;
System\Xml\Serialization\XmlReflectionImporter.cs (1)
2337_maxDepth = DiagnosticsSwitches.NonRecursiveTypeLoading.Enabled ? 1 : int.MaxValue;
System\Xml\Serialization\XmlSerializationWriter.cs (1)
586if (index <= int.MaxValue)
System\Xml\Xsl\IlGen\GenerateHelper.cs (1)
923if (dec >= (decimal)int.MinValue && dec <= (decimal)int.MaxValue && decimal.Truncate(dec) == dec)
System\Xml\Xsl\QIL\QilPatternVisitor.cs (1)
24public int Threshold { get; set; } = int.MaxValue;
System\Xml\Xsl\Runtime\NumberFormatter.cs (1)
76protected const int MaxAlphabeticValue = int.MaxValue; // Maximum value that can be represented
System\Xml\Xsl\XPath\XPathBuilder.cs (1)
984public const int Infinity = int.MaxValue;
System\Xml\Xsl\Xslt\QilGenerator.cs (2)
2079if (0 <= dblGroupingSize && dblGroupingSize <= int.MaxValue) 2091_f.Conditional(_f.And(_f.Lt(_f.Double(0), i), _f.Lt(i, _f.Double(int.MaxValue))),
System\Xml\Xsl\Xslt\XsltInput.cs (2)
194rec.end = new Location(rec.start.Line, int.MaxValue); 337rec.end = new Location(rec.start.Line, int.MaxValue);
System\Xml\Xsl\XsltOld\XsltOutput.cs (12)
25private int _methodSId = int.MaxValue; 27private int _encodingSId = int.MaxValue; 29private int _versionSId = int.MaxValue; 31private int _omitXmlDeclSId = int.MaxValue; 33private int _standaloneSId = int.MaxValue; 35private int _doctypePublicSId = int.MaxValue; 37private int _doctypeSystemSId = int.MaxValue; 39private int _indentSId = int.MaxValue; 41private int _mediaTypeSId = int.MaxValue; 56get { return _standaloneSId != int.MaxValue; } 98if (method == OutputMethod.Html && _indentSId == int.MaxValue) 122if (_indentSId == int.MaxValue)
System.Reflection.Metadata (7)
System\Reflection\Internal\Utilities\BlobUtilities.cs (1)
200return GetUTF8ByteCount(str, charCount, int.MaxValue, out _);
System\Reflection\Internal\Utilities\ReadOnlyUnmanagedMemoryStream.cs (1)
91if (target < 0 || target > int.MaxValue)
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
122if (maxSize > int.MaxValue)
System\Reflection\Metadata\BlobReader.cs (1)
15internal const int InvalidCompressedInteger = int.MaxValue;
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (1)
345branch = new BranchInfo(operandOffset: int.MaxValue, label: default,
System\Reflection\Metadata\Internal\NamespaceCache.cs (1)
75private StringHandle GetSimpleName(NamespaceDefinitionHandle fullNamespaceHandle, int segmentIndex = int.MaxValue)
System\Reflection\Metadata\TypeSystem\FieldDefinition.cs (1)
119if (offset > int.MaxValue)
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\HashHelpers.cs (1)
60for (int i = (min | 1); i < int.MaxValue; i += 2)
System.Resources.Extensions (3)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
605if (ms.Length > int.MaxValue) 615if (s.Length > int.MaxValue)
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
260if (stream.Length > int.MaxValue)
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
605if (ms.Length > int.MaxValue) 615if (s.Length > int.MaxValue)
System.Runtime.Caching (9)
System\Runtime\Caching\Configuration\ConfigUtil.cs (3)
65return int.MaxValue; 75int iValue = (milliseconds < (double)int.MaxValue) ? (int)milliseconds : int.MaxValue;
System\Runtime\Caching\Configuration\MemoryCacheElement.cs (1)
36new IntegerValidator(0, int.MaxValue),
System\Runtime\Caching\MemoryCacheStatistics.cs (4)
141_configPollingInterval = (milliseconds < (double)int.MaxValue) ? (int)milliseconds : int.MaxValue; 153_configCacheMemoryLimitMegabytes = ConfigUtil.GetIntValue(config, ConfigUtil.CacheMemoryLimitMegabytes, _configCacheMemoryLimitMegabytes, true, int.MaxValue); 359int cacheMemoryLimitMegabytes = ConfigUtil.GetIntValue(config, ConfigUtil.CacheMemoryLimitMegabytes, _configCacheMemoryLimitMegabytes, true, int.MaxValue);
System\Runtime\Caching\MemoryCacheStore.cs (1)
18private const int MAX_COUNT = int.MaxValue / 2;
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\HandleCollector.cs (1)
19this(name, initialThreshold, int.MaxValue)
System.Runtime.Numerics (21)
src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
194exp = int.MaxValue;
System\Number.BigInteger.cs (3)
315if (numberScale == int.MaxValue) 609else if (currentBufferSize == 1 && currentBuffer[0] <= int.MaxValue) 901Debug.Assert((long)BigInteger.MaxLength * (kcchBase + 1) / kcchBase + 1 < (long)int.MaxValue); // won't overflow
System\Numerics\BigInteger.cs (12)
58if (value <= int.MaxValue) 74if (int.MinValue < value && value <= int.MaxValue) 116if (value <= int.MaxValue) 2168if ((int.MinValue < value) && (value <= int.MaxValue)) 2270if (value <= (uint)int.MaxValue) 2490return ((value >> int.MaxValue) >> 1); 2549return ((value << int.MaxValue) << 1); 3241return RotateRight(RotateRight(value, int.MaxValue), 1); 3376return RotateLeft(RotateLeft(value, int.MaxValue), 1); 4694actualResult = IsNegative(value) ? int.MinValue : int.MaxValue; 4698actualResult = (value._sign >= int.MaxValue) ? int.MaxValue :
System\Numerics\Complex.cs (4)
1895int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue : 2031int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue :
System\Numerics\NumericsHelpers.cs (1)
32exp = int.MaxValue;
System.Runtime.Serialization.Formatters (6)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
67for (int i = (min | 1); i < int.MaxValue; i += 2) 103Debug.Assert(divisor <= int.MaxValue);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectReader.cs (1)
48private const int ThresholdForValueTypeIds = int.MaxValue;
System\Runtime\Serialization\ObjectManager.cs (3)
1431newLength = int.MaxValue; 1515newLength = int.MaxValue; 1558newLength = int.MaxValue;
System.Security.Cryptography (16)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
60CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
150if (ctx == null || ctx.IsInvalid || secretLengthU == 0 || secretLengthU > int.MaxValue)
System\Security\Cryptography\AesImplementation.cs (1)
188if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(this.LegalKeySizes))
System\Security\Cryptography\DesImplementation.cs (1)
65if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(LegalKeySizes))
System\Security\Cryptography\PemEncoding.cs (5)
292/// The length of the PEM-encoded value is larger than <see cref="int.MaxValue"/>. 331if (int.MaxValue - encodedDataLengthWithBreaks < totalEncapLength) 371/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 472/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 515/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>.
System\Security\Cryptography\RC2Implementation.cs (1)
215if (keySizeBytes > (int.MaxValue / BitsPerByte))
System\Security\Cryptography\SymmetricAlgorithm.cs (3)
96if (bitLength > int.MaxValue || !ValidKeySize((int)bitLength)) 336if (int.MaxValue - wholeBlocks < blockSizeBytes) 415if (int.MaxValue - feedbackAligned < feedbackSizeInBytes)
System\Security\Cryptography\TripleDesImplementation.cs (1)
57if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(LegalKeySizes))
System\Security\Cryptography\X509Certificates\OpenSslX509ChainEventSource.cs (1)
218AssetDownloadStart(timeoutMs > int.MaxValue ? -1 : (int)timeoutMs, uri);
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (1)
475/// The combined size of encoding all certificates exceeds <see cref="int.MaxValue" />.
System.Text.Encoding.CodePages (2)
System\Text\DecoderBestFitFallback.cs (1)
108if (iCount == int.MaxValue)
System\Text\EncoderBestFitFallback.cs (1)
130if (_iCount == int.MaxValue)
System.Text.Json (148)
System\Text\Json\BitStack.cs (2)
70Debug.Assert(_array.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {_array.Length}"); 135Debug.Assert(_array.Length < int.MaxValue / 2, $"Array too large - arrayLength: {_array.Length}");
System\Text\Json\Document\JsonDocument.cs (3)
936Debug.Assert(reader.TokenStartIndex <= int.MaxValue); 1020Debug.Assert(tokenStart < int.MaxValue); 1045Debug.Assert(tokenStart < int.MaxValue);
System\Text\Json\Document\JsonDocument.DbRow.cs (1)
36internal int SizeOrLength => _sizeOrLengthUnion & int.MaxValue;
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
255if (newCapacity == toReturn.Length) newCapacity = int.MaxValue;
System\Text\Json\JsonConstants.cs (1)
76public const int MaxUtf16RawValueLength = int.MaxValue / MaxExpansionFactorWhileTranscoding;
System\Text\Json\JsonHelpers.Escaping.cs (2)
33Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 61Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
411/// than <see cref="int.MaxValue"/>.
System\Text\Json\Serialization\ReadBufferState.cs (2)
120byte[] newBuffer = ArrayPool<byte>.Shared.Rent((_buffer.Length < (int.MaxValue / 2)) ? _buffer.Length * 2 : int.MaxValue);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
710Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 865Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (6)
139Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 162Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 213Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - encodedLength - 6); 248Debug.Assert(escapedPropertyName.Length < int.MaxValue - encodedLength - 6); 287Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - encodedLength - 7 - _newLineLength); 337Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - encodedLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (6)
146Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 169Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 218Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 252Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 289Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength); 338Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (6)
145Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 168Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 217Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 251Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 288Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength); 337Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (6)
145Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 168Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 217Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDecimalLength - 4); 248Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDecimalLength - 4); 282Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength); 328Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (6)
149Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 172Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 221Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDoubleLength - 4); 252Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDoubleLength - 4); 286Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength); 332Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (6)
149Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 172Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 221Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatSingleLength - 4); 252Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatSingleLength - 4); 286Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatSingleLength - 5 - _newLineLength); 332Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatSingleLength - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (2)
116Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 139Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (6)
145Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 168Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 217Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatGuidLength - 6); 252Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatGuidLength - 6); 290Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength); 340Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (4)
63Debug.Assert(escapedPropertyName.Length < int.MaxValue - 5); 94Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 6 - _newLineLength); 135Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 5); 166Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 6 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (7)
267Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 290Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 340Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - value.Length - 4); 371Debug.Assert(escapedPropertyName.Length < int.MaxValue - value.Length - 4); 404Debug.Assert(escapedPropertyNameSection.Length < int.MaxValue - value.Length - 1); 433Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - value.Length - 5 - _newLineLength); 479Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - value.Length - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (6)
221Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 244Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 293Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatInt64Length - 4); 324Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatInt64Length - 4); 358Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength); 404Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (41)
98Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 115Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 162Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 4) / JsonConstants.MaxExpansionFactorWhileTranscoding); 193Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 5 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding); 247Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 274Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 323Debug.Assert(escapedPropertyName.Length < int.MaxValue - 4); 353Debug.Assert(escapedPropertyNameSection.Length < int.MaxValue - 4); 381Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 5 - _newLineLength); 610Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 700Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 790Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 862Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 911Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 934Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 957Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 980Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1006Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 1007Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 1025Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 1026Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 1044Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 1045Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 1063Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 1064Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 1079Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 1080Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 1139Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 1140Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1199Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 1200Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 1259Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 1260Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1373Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 6) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length); 1408Debug.Assert(escapedPropertyName.Length < int.MaxValue - escapedValue.Length - 6); 1444Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6); 1480Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6); 1519Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 7 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length); 1569Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - escapedValue.Length - 7 - _newLineLength); 1620Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength); 1671Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (6)
230Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 253Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 302Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatUInt64Length - 4); 333Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatUInt64Length - 4); 367Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatUInt64Length - 5 - _newLineLength); 413Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatUInt64Length - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (5)
55const int MaxLengthAllowed = int.MaxValue / 4 * 3; 62Debug.Assert(encodingLength <= int.MaxValue - 3); 67Debug.Assert((uint)maxRequired <= int.MaxValue); 98int maxLengthAllowed = int.MaxValue / 4 * 3 - extraSpaceRequired; 107Debug.Assert((uint)maxRequired <= int.MaxValue - 3);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (4)
76Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 4); 110Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 4 - _newLineLength); 191Debug.Assert(utf8Value.Length < int.MaxValue - 4); 217Debug.Assert(utf8Value.Length < int.MaxValue - indent - 4 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (1)
72Debug.Assert(utf8Value.Length < int.MaxValue - indent - 1 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (9)
18/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882 (<see cref="int.MaxValue"/> / 3).</exception> 54/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882 (<see cref="int.MaxValue"/> / 3).</exception> 85/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than or equal to <see cref="int.MaxValue"/>.</exception> 108if (utf8Json.Length == int.MaxValue) 110ThrowHelper.ThrowArgumentException_ValueTooLarge(int.MaxValue); 121/// <exception cref="ArgumentException">Thrown if the length of the input is zero or equal to <see cref="int.MaxValue"/>.</exception> 150if (utf8JsonLen >= int.MaxValue) 171Debug.Assert(utf8JsonLen < int.MaxValue); 244Debug.Assert(len < int.MaxValue);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (6)
118Debug.Assert(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 3); 148Debug.Assert(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 3 - _newLineLength); 185Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 265Debug.Assert(escapedValue.Length < int.MaxValue - 3); 295Debug.Assert(escapedValue.Length < int.MaxValue - indent - 3 - _newLineLength); 332Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
System.Text.RegularExpressions (85)
System\Text\RegularExpressions\MatchCollection.cs (1)
111GetMatch(int.MaxValue);
System\Text\RegularExpressions\Regex.Timeout.cs (1)
15private const ulong MaximumMatchTimeoutTicks = 10_000UL * (int.MaxValue - 1); // TimeSpan.FromMilliseconds(int.MaxValue - 1).Ticks;
System\Text\RegularExpressions\RegexCompiler.cs (12)
1247Debug.Assert(target.LoopNode.N == int.MaxValue); 3517if (node.N != int.MaxValue) 3836Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4167if (maxIterations != int.MaxValue) 4436if (maxIterations != int.MaxValue) 4447else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4470if (maxIterations != int.MaxValue) 4496if (maxIterations != int.MaxValue) 4559if (maxIterations != int.MaxValue) 4702Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4740Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4872switch ((minIterations > 0, maxIterations == int.MaxValue, iterationMayBeEmpty))
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
764Debug.Assert(loopNode.N == int.MaxValue);
System\Text\RegularExpressions\RegexInterpreterCode.cs (2)
222sb.Append(", rep = ").Append(Codes[opcodeOffset + 2] == int.MaxValue ? "inf" : Codes[opcodeOffset + 2]); 227sb.Append(", limit = ").Append(Codes[opcodeOffset + 2] == int.MaxValue ? "inf" : Codes[opcodeOffset + 2]);
System\Text\RegularExpressions\RegexNode.cs (32)
38/// <remarks>No upper bound is represented by <see cref="int.MaxValue"/>. No capture group is represented by -1.</remarks> 99newNode.N = N == int.MaxValue ? int.MaxValue : N - 1; 384case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue: 385case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry: 826u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min; 831u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max; 835if (min == int.MaxValue) 1642if (nodeMin == int.MaxValue || 1643nextMin == int.MaxValue || 1644(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1650if (nodeMax != int.MaxValue && 1651nextMax != int.MaxValue && 1652(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1681if (currentNode.N != int.MaxValue) 1683currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1695if (currentNode.N != int.MaxValue) 1719if (currentNode.N != int.MaxValue) 1761currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2284return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2316return (int)Math.Min(int.MaxValue - 1, sum); 2386return N == int.MaxValue ? null : N; 2389if (N != int.MaxValue) 2395if (maxLength < int.MaxValue) 2450if (sum < int.MaxValue) 2938(M == 0 && N == int.MaxValue) ? "*" : 2940(M == 1 && N == int.MaxValue) ? "+" : 2941(N == int.MaxValue) ? $"{{{M}, *}}" :
System\Text\RegularExpressions\RegexParseError.cs (1)
57/// A captured group or a quantifier in a regular expression is not within range, that is, it is larger than <see cref="int.MaxValue"/>.
System\Text\RegularExpressions\RegexParser.cs (6)
21private const int MaxValueDiv10 = int.MaxValue / 10; 22private const int MaxValueMod10 = int.MaxValue % 10; 444max = int.MaxValue; 453max = int.MaxValue; 464max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 1801_captop = i == int.MaxValue ? i : i + 1;
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
1135if (firstChild.Kind is not (RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) || firstChild.N != int.MaxValue)
System\Text\RegularExpressions\RegexWriter.cs (8)
314if (node.N < int.MaxValue || node.M > 1) 333if (node.N < int.MaxValue || node.M > 1) 334Emit(RegexOpcode.Branchcount + Lazy, _intStack.Pop(), node.N == int.MaxValue ? int.MaxValue : node.N - node.M); 399Emit((RegexOpcode)node.Kind | bits, node.Ch, node.N == int.MaxValue ? int.MaxValue : node.N - node.M); 414Emit((RegexOpcode)node.Kind | bits, stringCode, (node.N == int.MaxValue) ? int.MaxValue : node.N - node.M);
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (4)
148_anyStar = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: false); 149_anyStarLazy = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: true); 217internal SymbolicRegexNode<TSet> CreateLoop(SymbolicRegexNode<TSet> node, bool isLazy, int lower = 0, int upper = int.MaxValue) 232if (!isLazy && lower == 0 && upper == int.MaxValue && node._kind == SymbolicRegexNodeKind.Singleton)
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (1)
22maxLabelLength = int.MaxValue;
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (14)
363public bool IsStar => _lower == 0 && _upper == int.MaxValue; 374public bool IsPlus => _lower == 1 && _upper == int.MaxValue; 916if (length <= int.MaxValue) 935if (length <= int.MaxValue) 1179else if (loop._upper == int.MaxValue) 1217int newupper = _upper == int.MaxValue ? int.MaxValue : _upper - 1; 1219int newlower = _lower is 0 or int.MaxValue ? _lower : _lower - 1; 1716if (_upper == int.MaxValue) 1992return (_upper < int.MaxValue) && (_upper > upperBoundLowestValue); 2298if (_upper == int.MaxValue) 2300if (_lower is 0 or int.MaxValue) 2337return (int)Math.Min((long)m + n, int.MaxValue); 2344return (int)Math.Min((long)m * n, int.MaxValue);
System\Text\RegularExpressions\Symbolic\SymbolicRegexRunnerFactory.cs (1)
30if (threshold != int.MaxValue)
System.Text.RegularExpressions.Generator (61)
RegexGenerator.Emitter.cs (21)
1328Debug.Assert(target.LoopNode.N == int.MaxValue); 3448if (node.N != int.MaxValue) 3661Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 3905if (maxIterations != int.MaxValue || iterationMayBeEmpty) 3910if (maxIterations == int.MaxValue) 4108if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4123string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4131else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4154if (maxIterations != int.MaxValue) 4162writer.WriteLine(maxIterations != int.MaxValue ? 4177if (minIterations != 0 || maxIterations != int.MaxValue) 4188string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4262Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4282Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4408if (maxIterations == int.MaxValue && !iterationMayBeEmpty) 4425else if (minIterations > 0 && maxIterations == int.MaxValue) 4441else if (maxIterations == int.MaxValue) 5601(0, int.MaxValue) => " any number of times", 5602(1, int.MaxValue) => " at least once", 5603(2, int.MaxValue) => " at least twice", 5604(_, int.MaxValue) => $" at least {node.M} times",
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (32)
38/// <remarks>No upper bound is represented by <see cref="int.MaxValue"/>. No capture group is represented by -1.</remarks> 99newNode.N = N == int.MaxValue ? int.MaxValue : N - 1; 384case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue: 385case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry: 826u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min; 831u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max; 835if (min == int.MaxValue) 1642if (nodeMin == int.MaxValue || 1643nextMin == int.MaxValue || 1644(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1650if (nodeMax != int.MaxValue && 1651nextMax != int.MaxValue && 1652(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1681if (currentNode.N != int.MaxValue) 1683currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1695if (currentNode.N != int.MaxValue) 1719if (currentNode.N != int.MaxValue) 1761currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2284return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2316return (int)Math.Min(int.MaxValue - 1, sum); 2386return N == int.MaxValue ? null : N; 2389if (N != int.MaxValue) 2395if (maxLength < int.MaxValue) 2450if (sum < int.MaxValue) 2938(M == 0 && N == int.MaxValue) ? "*" : 2940(M == 1 && N == int.MaxValue) ? "+" : 2941(N == int.MaxValue) ? $"{{{M}, *}}" :
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParseError.cs (1)
57/// A captured group or a quantifier in a regular expression is not within range, that is, it is larger than <see cref="int.MaxValue"/>.
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (6)
21private const int MaxValueDiv10 = int.MaxValue / 10; 22private const int MaxValueMod10 = int.MaxValue % 10; 444max = int.MaxValue; 453max = int.MaxValue; 464max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 1801_captop = i == int.MaxValue ? i : i + 1;
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
1135if (firstChild.Kind is not (RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) || firstChild.N != int.MaxValue)
System.Threading (13)
System\Threading\Barrier.cs (3)
212/// or greater than <see cref="int.MaxValue"/>.</exception> 526/// <see cref="int.MaxValue"/>.</exception> 569if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
System\Threading\CountdownEvent.cs (9)
259/// cref="int.MaxValue"/>.</exception> 274/// cref="int.MaxValue"/>.</exception> 292/// cref="int.MaxValue"/>.</exception> 315/// cref="int.MaxValue"/>.</exception> 335else if (observedCount > (int.MaxValue - signalCount)) 451/// than <see cref="int.MaxValue"/>.</exception> 461ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout)); 480/// than <see cref="int.MaxValue"/>.</exception> 492ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\Threading\ReaderWriterLock.cs (1)
1112ArgumentOutOfRangeException.ThrowIfGreaterThan(timeoutMilliseconds, int.MaxValue, nameof(timeout));
System.Threading.Channels (1)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
System.Threading.Tasks.Dataflow (8)
Base\DataflowBlock.cs (4)
846/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 867/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 923/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 946/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>.
Base\DataflowBlockOptions.cs (2)
147get { return (_maxMessagesPerTask == Unbounded) ? int.MaxValue : _maxMessagesPerTask; } 324get { return (_maxDegreeOfParallelism == Unbounded) ? int.MaxValue : _maxDegreeOfParallelism; }
Internal\Common.cs (1)
423return millisecondsTimeout >= Timeout.Infinite && millisecondsTimeout <= int.MaxValue;
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
System.Threading.Tasks.Parallel (4)
System\Threading\Tasks\Parallel.cs (1)
114if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
System\Threading\Tasks\ParallelRangeManager.cs (2)
241Debug.Assert((uSpan / uRangeSize) < int.MaxValue); 254_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
System\Threading\Tasks\TaskReplicator.cs (1)
148int maxConcurrencyLevel = (options.EffectiveMaxConcurrencyLevel > 0) ? options.EffectiveMaxConcurrencyLevel : int.MaxValue;
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (1)
87return int.MaxValue;
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonWindowSmallIconConverter.cs (1)
94int bestScore = int.MaxValue;
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
453int.MaxValue,
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (1)
338public static readonly DependencyProperty MaxColumnCountProperty = RibbonGallery.MaxColumnCountProperty.AddOwner(typeof(RibbonGalleryCategory), new FrameworkPropertyMetadata(int.MaxValue, FrameworkPropertyMetadataOptions.AffectsMeasure, new PropertyChangedCallback(OnNotifyPropertyChanged), new CoerceValueCallback(CoerceMaxColumnCount)));
System.Xaml (2)
System\Xaml\Schema\MemberReflector.cs (2)
18private const DesignerSerializationVisibility VisibilityInvalid = (DesignerSerializationVisibility)int.MaxValue; 20private const DesignerSerializationVisibility VisibilityNone = (DesignerSerializationVisibility)(int.MaxValue - 1);
VersioningWebSite (1)
Controllers\CustomersController.cs (1)
46[Version(MinVersion = 2, Order = int.MaxValue)]
WindowsFormsIntegration (10)
System\Windows\Integration\Convert.cs (2)
310if (value > int.MaxValue) 312return int.MaxValue;
System\Windows\Integration\ElementHost.cs (2)
112if (constraints.Width == Int32.MaxValue) { constraints.Width = Double.PositiveInfinity; } 113if (constraints.Height == Int32.MaxValue) { constraints.Height = Double.PositiveInfinity; }
System\Windows\Integration\HostUtils.cs (6)
48if (size.Width == 0) { size.Width = int.MaxValue; } 49if (size.Height == 0) { size.Height = int.MaxValue; } 56if (size.Width == 0 || size.Width == 1) { size.Width = int.MaxValue; } 57if (size.Height == 0 || size.Height == 1) { size.Height = int.MaxValue; } 63if (size.Width == int.MaxValue) 67if (size.Height == int.MaxValue)