3025 references to MaxValue
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (1)
144public static void ThrowIfOutOfRange(int value, [CallerArgumentExpression("value")] string? paramName = null, int min = int.MinValue, int max = int.MaxValue, string? minName = null, string? maxName = null, string? message = null)
Aspire.Dashboard (3)
Configuration\DashboardOptions.cs (2)
236public int MaxAttributeLength { get; set; } = int.MaxValue; 237public int MaxSpanEventCount { get; set; } = int.MaxValue;
Model\KnownPropertyLookup.cs (1)
79return (int.MaxValue, null);
Aspire.Dashboard.Components.Tests (1)
tests\Aspire.Dashboard.Tests\Model\MockKnownPropertyLookup.cs (1)
10private int _priority = int.MaxValue;
Aspire.Dashboard.Tests (5)
ConsoleLogsTests\LogEntriesTests.cs (1)
14var logEntries = new LogEntries(maximumEntryCount: maximumEntryCount ?? int.MaxValue);
DashboardOptionsTests.cs (3)
171options.ResourceServiceClient.ClientCertificate.Source = (DashboardClientCertificateSource)int.MaxValue; 197options.ResourceServiceClient.AuthMode = (ResourceClientAuthMode)int.MaxValue; 202Assert.Equal($"Unexpected resource service client authentication mode: {int.MaxValue}", result.FailureMessage);
Model\MockKnownPropertyLookup.cs (1)
10private int _priority = int.MaxValue;
Aspire.Hosting (3)
Dcp\DcpPipelineBuilder.cs (1)
70MaxRetryAttempts = int.MaxValue,
Dcp\KubernetesService.cs (2)
378MaxRetryAttempts = int.MaxValue, 474MaxRetryAttempts = int.MaxValue,
Aspire.Hosting.Oracle.Tests (2)
OracleFunctionalTests.cs (2)
85MaxRetryAttempts = int.MaxValue, 257MaxRetryAttempts = int.MaxValue,
Aspire.Hosting.SqlServer.Tests (2)
SqlServerFunctionalTests.cs (2)
67.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 132.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Tests (1)
Utils\PasswordGeneratorTests.cs (1)
37Assert.Throws<OverflowException>(() => Generate(10, true, true, true, true, int.MaxValue, 1, 0, 0));
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
142public static void ThrowIfOutOfRange(int value, [CallerArgumentExpression(nameof(value))] string? paramName = null, int min = int.MinValue, int max = int.MaxValue, string? minName = null, string? maxName = null, string? message = null)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
142public static void ThrowIfOutOfRange(int value, [CallerArgumentExpression(nameof(value))] string? paramName = null, int min = int.MinValue, int max = int.MaxValue, string? minName = null, string? maxName = null, string? message = null)
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (1)
150public static void ThrowIfOutOfRange(int value, [CallerArgumentExpression(nameof(value))] string? paramName = null, int min = int.MinValue, int max = int.MaxValue, string? minName = null, string? maxName = null, string? message = null)
BinaryFormatTests (7)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (3)
191new Point(int.MaxValue, int.MinValue), 195new Rectangle(int.MinValue, int.MaxValue, 0, 0), 197new Size(int.MaxValue, int.MinValue),
FormatTests\FormattedObject\ListTests.cs (2)
21int.MaxValue, 49int.MaxValue,
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
48{ (byte)PrimitiveType.Int32, int.MaxValue }, 119int.MaxValue,
BuildActionTelemetryTable (6)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Contract.Message.IntegrationTests (1)
MessageContractCommon.4.1.0.cs (1)
153MessageBuffer buffer = reply.CreateBufferedCopy(int.MaxValue);
DesignSurfaceExt (1)
NameCreationServiceImp.cs (1)
24int min = int.MaxValue;
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (1)
638return int.MaxValue;
dotnet-svcutil-lib (139)
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathDocumentNavigator.cs (1)
883return int.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXPathNavigator.cs (1)
479int index = Int32.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\Dom\XPathNodeList.cs (1)
33ReadUntil(Int32.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\HWStack.cs (1)
22internal HWStack(int GrowthRate) : this(GrowthRate, int.MaxValue) { }
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3331private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(int.MinValue, int.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\Parser.cs (2)
76_markupDepth = int.MaxValue; 257_markupDepth = int.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\schema\ParserAsync.cs (1)
41_markupDepth = int.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (2)
887if (value < (decimal)Int32.MinValue || value > (decimal)Int32.MaxValue) 943if (value < (long)Int32.MinValue || value > (long)Int32.MaxValue)
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDuration.cs (1)
700if (result > (Int32.MaxValue - digit) / 10)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
464int leastDerivedLevel = int.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCountingReader.cs (1)
30if (_advanceCount == Int32.MaxValue)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (1)
2348_maxDepth = /*DiagnosticsSwitches.NonRecursiveTypeLoading.Enabled ? 1 :*/ int.MaxValue;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
561if (index <= Int32.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (2)
435if (i == Int32.MaxValue) 1510if (i == Int32.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
650int newSize = (value < Int32.MaxValue / 2) ? value * 2 : Int32.MaxValue;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (3)
44Initialize(type, knownTypes, int.MaxValue, false, false, null, false); 56Initialize(type, dictionary.Add(rootName), dictionary.Add(DataContract.GetNamespace(rootNamespace)), knownTypes, int.MaxValue, false, false, null, false); 67Initialize(type, rootName, rootNamespace, knownTypes, int.MaxValue, false, false, null, false);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializerSettings.cs (1)
16private int _maxItemsInObjectGraph = int.MaxValue;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (2)
379if (i == Int32.MaxValue) 1347Int32.MaxValue, false /*ignoreExtensionDataObject*/, true /*preserveObjectReferences*/, null /*dataContractResolver*/);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
573object forLoop = _ilg.For(i, 0, Int32.MaxValue); 669object forLoop = _ilg.For(i, 0, Int32.MaxValue);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (4)
470if (index == Int32.MaxValue) 474string.Format(SRSerialization.MaxArrayLengthExceeded, Int32.MaxValue, 477int newSize = (index < Int32.MaxValue / 2) ? index * 2 : Int32.MaxValue;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
626return Math.Min(context.RemainingItemCount, int.MaxValue);
FrameworkFork\System.Runtime.Serialization\System\Text\Base64Encoding.cs (2)
284if (byteCount < 0 || byteCount > int.MaxValue / 4 * 3 - 2) 285throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("byteCount", string.Format(SRSerialization.ValueMustBeInRange, 0, int.MaxValue / 4 * 3 - 2)));
FrameworkFork\System.Runtime.Serialization\System\Text\BinHexEncoding.cs (2)
110if (byteCount < 0 || byteCount > int.MaxValue / 2) 111throw new ArgumentOutOfRangeException("byteCount", string.Format(SRSerialization.ValueMustBeInRange, 0, int.MaxValue / 2));
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (2)
255if (value >= int.MinValue && value <= int.MaxValue) 263if (value <= int.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReader.cs (1)
331if (totalLength > int.MaxValue - actual)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
517if (value >= int.MinValue && value <= int.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriterSession.cs (1)
203if (++_now == int.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (3)
218DiagnosticUtility.DebugAssert(_offset <= int.MaxValue - count, ""); 270if (windowOffset > int.MaxValue - windowLength) 271windowLength = int.MaxValue - windowOffset;
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (4)
530if (value > int.MaxValue / 10) 533if (value > int.MaxValue - digit) 724while (value > int.MaxValue) 742Fx.Assert(value >= int.MinValue && value <= int.MaxValue, "");
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReaderQuotas.cs (5)
37private static readonly XmlDictionaryReaderQuotas s_maxQuota = new XmlDictionaryReaderQuotas(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue,
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryString.cs (1)
17internal const int MaxKey = int.MaxValue / 4;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\BufferedOutputStream.cs (4)
42: this(0, maxSize, InternalBufferManager.Create(0, int.MaxValue)) 112if (_currentChunk.Length > (int.MaxValue / 2)) 114newChunkSize = int.MaxValue; 241if ((int.MaxValue - size) < _totalSize)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InternalBufferManager.cs (2)
68int bufferCount = bufferCountLong > int.MaxValue ? int.MaxValue : (int)bufferCountLong;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (3)
14public static readonly TimeSpan MaxWait = TimeSpan.FromMilliseconds(Int32.MaxValue); 94if (ticks / TimeSpan.TicksPerMillisecond > int.MaxValue) 96return int.MaxValue;
FrameworkFork\System.ServiceModel\Internals\TraceCore.Designer.cs (10)
77string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 113string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 136string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 264string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 372string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 395string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 418string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 442string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 466string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue); 490string serializedException = EtwDiagnosticTrace.ExceptionToTraceString(exception, int.MaxValue);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeader.cs (6)
36return CreateAddressHeader(value, DataContractSerializerDefaults.CreateSerializer(type, int.MaxValue/*maxItems*/)); 48return CreateAddressHeader(name, ns, value, DataContractSerializerDefaults.CreateSerializer(GetObjectType(value), name, ns, int.MaxValue/*maxItems*/)); 106return GetValue<T>(DataContractSerializerDefaults.CreateSerializer(typeof(T), this.Name, this.Namespace, int.MaxValue/*maxItems*/)); 124XmlBuffer buffer = new XmlBuffer(int.MaxValue); 289: base(name.Value, ns.Value, value, DataContractSerializerDefaults.CreateSerializer(GetObjectType(value), name, ns, int.MaxValue/*maxItems*/)) 311_buffer = new XmlBuffer(int.MaxValue);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedMessageWriter.cs (2)
33if (maxSizeQuota <= int.MaxValue - initialOffset) 36effectiveMaxSize = int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (2)
258string.Format(SRServiceModel.ValueMustBeInRange, -1, int.MaxValue))); 273string.Format(SRServiceModel.ValueMustBeInRange, -1, int.MaxValue)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionOrientedTransportBindingElement.cs (2)
104if (maxReceivedMessageSize > int.MaxValue) 106return int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionOrientedTransportChannelFactory.cs (1)
38if (bindingElement.TransferMode == TransferMode.Buffered && bindingElement.MaxReceivedMessageSize > int.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (1)
114int.MaxValue, this.BufferManager, SessionEncoder.MaxMessageFrameSize);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
58if (bindingElement.MaxReceivedMessageSize > int.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpTransportBindingElement.cs (2)
214if (maxReceivedMessageSize > int.MaxValue) 215return int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MaxMessageSizeStream.cs (1)
99if (bytesRemaining > int.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (7)
115return CreateMessage(version, action, body, DataContractSerializerDefaults.CreateSerializer(GetObjectType(body), int.MaxValue/*maxItems*/)); 240return this.GetBodyCore<T>(reader, DataContractSerializerDefaults.CreateSerializer(typeof(T), int.MaxValue/*maxItems*/)); 263XmlBuffer buffer = new XmlBuffer(int.MaxValue); 347XmlBuffer bodyBuffer = new XmlBuffer(int.MaxValue); 1477int maxSizeOfAttributes = int.MaxValue; 1479if (maxSizeOfAttributes < int.MaxValue - 4096) 1793int maxSizeOfHeaders = int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageBuffer.cs (1)
119msg = Message.CreateMessage(_msgBuffer.GetReader(0), int.MaxValue, _version);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
226_buffer = _messageEncoder.WriteMessage(_message, int.MaxValue, _bufferManager);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoderCompressionHandler.cs (2)
20int maxDecompressedSize = (int)Math.Min(maxReceivedMessageSize, int.MaxValue); 61using (BufferManagerOutputStream bufferedOutStream = new BufferManagerOutputStream(SRServiceModel.MaxSentMessageSizeExceeded, 1024, int.MaxValue, bufferManager))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (3)
31(detail == null ? typeof(object) : detail.GetType()), int.MaxValue/*maxItems*/), "", ""); 163return GetDetail<T>(DataContractSerializerDefaults.CreateSerializer(typeof(T), int.MaxValue/*maxItems*/)); 209XmlBuffer detailBuffer = new XmlBuffer(int.MaxValue);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (1)
429(_objectToSerialize == null ? typeof(object) : _objectToSerialize.GetType()), this.Name, this.Namespace, int.MaxValue/*maxItems*/);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (5)
441XmlBuffer buffer = new XmlBuffer(int.MaxValue); 451XmlBuffer buffer = new XmlBuffer(int.MaxValue); 461XmlBuffer buffer = new XmlBuffer(int.MaxValue); 836return GetHeader<T>(name, ns, DataContractSerializerDefaults.CreateSerializer(typeof(T), name, ns, int.MaxValue/*maxItems*/)); 867return GetHeader<T>(index, DataContractSerializerDefaults.CreateSerializer(typeof(T), headerInfo.Name, headerInfo.Namespace, int.MaxValue/*maxItems*/));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportChannelFactory.cs (2)
156if (MaxReceivedMessageSize > int.MaxValue) 157return int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDefaults.cs (4)
39public const int BufferedReadDefaultMaxStringContentLength = Int32.MaxValue; 40public const int BufferedReadDefaultMaxArrayLength = Int32.MaxValue; 41public const int BufferedReadDefaultMaxBytesPerRead = Int32.MaxValue; 42public const int BufferedReadDefaultMaxNameTableCharCount = Int32.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
325return MessageEncoder.WriteMessage(message, int.MaxValue, BufferManager, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporterQuotas.cs (2)
74settings._maxPolicyNodes = int.MaxValue; 75settings._maxPolicyAssertions = int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
141for (int i = 0; i < Int32.MaxValue; i++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\MessageLogger.cs (1)
29All = int.MaxValue
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
18internal const int MaxItemsInObjectGraph = int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultContractInfo.cs (2)
61_serializer = DataContractSerializerDefaults.CreateSerializer(_detail, _knownTypes, int.MaxValue /* maxItemsInObjectGraph */); 65_serializer = DataContractSerializerDefaults.CreateSerializer(_detail, _knownTypes, _elementName, _ns == null ? string.Empty : _ns, int.MaxValue /* maxItemsInObjectGraph */);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
88return DataContractSerializerDefaults.CreateSerializer(detailType, int.MaxValue /* maxItemsInObjectGraph */ );
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
187_streamBufferManager = BufferManager.CreateBufferManager(0, int.MaxValue);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (5)
24_threshold = int.MaxValue; 31_threshold = int.MaxValue; 41_threshold = int.MaxValue; 52string.Format(SRServiceModel.ValueMustBeInRange, -1, int.MaxValue))); 54_threshold = int.MaxValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\WSHttpBindingBase.cs (1)
80if (value > int.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlBuffer.cs (1)
65BufferManager.CreateBufferManager(0, int.MaxValue));
FrameworkFork\System.Web.Services\Services\Description\MimeFormatExtensions.cs (2)
217get { return _repeats == int.MaxValue ? "*" : _repeats.ToString(CultureInfo.InvariantCulture); } 221_repeats = int.MaxValue;
HelpGenerator.cs (2)
461return int.MaxValue; 466return int.MaxValue;
Metadata\ServiceDescriptor.cs (1)
131new MaxMessageSizeStream(stream, int.MaxValue),
Extensibility.MessageEncoder.IntegrationTests (1)
CustomTextMessageEncoder.cs (1)
67return ReadMessage(stream, int.MaxValue);
Extensibility.MessageInterceptor.IntegrationTests (3)
TimeoutHelper.cs (3)
86if (ticks / TimeSpan.TicksPerMillisecond > int.MaxValue) 88return int.MaxValue; 136TimeSpan maxWait = TimeSpan.FromMilliseconds(Int32.MaxValue);
GenerateDocumentationAndConfigFiles (2)
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (2)
41internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
http2cat (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public 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)
25public const uint MaxWindowSize = int.MaxValue;
IIS.LongTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
illink (1)
InMemory.FunctionalTests (28)
Http2\Http2ConnectionTests.cs (15)
832_clientSettings.InitialWindowSize = int.MaxValue; 837await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1065_clientSettings.InitialWindowSize = int.MaxValue; 1070await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1284_clientSettings.InitialWindowSize = int.MaxValue; 1289await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1398_clientSettings.InitialWindowSize = int.MaxValue; 1421await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize); 1701_serviceContext.ServerOptions.Limits.Http2.MaxStreamsPerConnection = int.MaxValue; 1705Assert.Equal((uint)int.MaxValue * 2, _connection.MaxTrackedStreams); 1784expectedLastStreamId: int.MaxValue, 3780[InlineData((int)(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE), (uint)int.MaxValue + 1, (int)(Http2ErrorCode.FLOW_CONTROL_ERROR))] 5144VerifyGoAway(await ReceiveFrameAsync(), int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 5219VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR); 5250VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR);
Http2\Http2StreamTests.cs (2)
2235await WaitForConnectionErrorAsync<Exception>(ignoreNonGoAwayFrames: false, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); 2586await WaitForConnectionErrorAsync<Exception>(ignoreNonGoAwayFrames: false, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR);
Http2\Http2TimeoutTests.cs (9)
194expectedLastStreamId: int.MaxValue, 495expectedLastStreamId: int.MaxValue, 549expectedLastStreamId: int.MaxValue, 615expectedLastStreamId: int.MaxValue, 662expectedLastStreamId: int.MaxValue, 713expectedLastStreamId: int.MaxValue, 780expectedLastStreamId: int.MaxValue, 848expectedLastStreamId: int.MaxValue, 989expectedLastStreamId: int.MaxValue,
Http3\Http3ConnectionTests.cs (1)
368[InlineData(int.MaxValue, 20_000)] // Unknown frame type
Http3\Http3StreamTests.cs (1)
2770[InlineData(int.MaxValue)]
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
1918var retryCount = !Debugger.IsAttached ? 5 : int.MaxValue;
Metrics (2)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Metrics.Legacy (2)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Microsoft.Analyzers.Local (2)
ApiLifecycle\Json\JsonValue.cs (2)
213if (current >= int.MaxValue) 215return int.MaxValue;
Microsoft.Analyzers.Local.Tests (1)
Json\JsonValueTest.cs (1)
94Assert.Equal(int.MaxValue, new JsonValue(uint.MaxValue).AsInteger);
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)
1747tree.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.HeaderParsing (1)
HeaderParsingOptions.cs (1)
33[Range(0, 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.OpenApi.SourceGenerators (1)
Helpers\StringExtensions.cs (1)
25var minLeadingWhitespace = int.MaxValue;
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (2)
375[([Range(int.MinValue, int.MaxValue)] int id) => {}, (OpenApiSchema schema) => { Assert.Equal(int.MinValue.ToString(CultureInfo.InvariantCulture), schema.Minimum); Assert.Equal(int.MaxValue.ToString(CultureInfo.InvariantCulture), schema.Maximum); }],
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)
138var 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)
315cachePolicy.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)
258Assert.False(requestTimingFeature.TryGetTimestamp((HttpSysRequestTimingType)int.MaxValue, out var invalid));
ResponseCachingTests.cs (1)
179httpContext.Response.Headers["Cache-Control"] = "public, max-age=" + int.MaxValue.ToString(CultureInfo.InvariantCulture);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public 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)
199(int)Math.Min(MaxTrackedStreams, int.MaxValue), 252_frameWriter.WriteGoAwayAsync(int.MaxValue, errorCode).Preserve(); 1507_frameWriter.WriteGoAwayAsync(int.MaxValue, Http2ErrorCode.NO_ERROR).Preserve();
Internal\Http2\Http2FrameWriter.cs (2)
254Debug.Assert(actual <= int.MaxValue); 357await WriteGoAwayAsync(int.MaxValue, http2ErrorCode);
Internal\Http3\Http3FrameWriter.cs (2)
76_maxTotalHeaderSize = clientPeerSettings.MaxRequestHeaderFieldSectionSize > int.MaxValue 77? int.MaxValue
Internal\Infrastructure\PipeWriterHelpers\ConcurrentPipeWriter.cs (1)
393private 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)
25public 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)
25public 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 (8)
Collections\RetrievableEntryHashSet\HashHelpers.cs (1)
73for (int i = (min | 1); i < Int32.MaxValue; i += 2)
Evaluation\Expander\ArgumentParser.cs (2)
180if (d >= int.MinValue && d <= int.MaxValue) 191if (l >= int.MinValue && l <= int.MaxValue)
Graph\ParallelWorkSet.cs (1)
91_semaphore = new SemaphoreSlim(0, int.MaxValue);
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
259if (stream.CanSeek && stream.Length > int.MaxValue)
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (2)
15if (bytesCount is < 0 or > int.MaxValue) 60MemoryStream ms = stream.TryGetLength(out long length) && length <= int.MaxValue ? new((int)length) : new();
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
275if (fileStream.Length > int.MaxValue)
Microsoft.Build.CommandLine.UnitTests (2)
XMake_Tests.cs (2)
197sa = QuotingUtilities.SplitUnquoted("abc,,;dxyz", int.MaxValue, false, false, out emptySplits, ';', ','); 204sa = QuotingUtilities.SplitUnquoted("abc,,;dxyz", int.MaxValue, true, false, out emptySplits, ';', ',');
Microsoft.Build.Engine.UnitTests (20)
BackEnd\TargetBuilder_Tests.cs (1)
1027BuildResult result = BuildSimpleProject(projectBody, new (string name, TargetBuiltReason reason)[] { ("Build", TargetBuiltReason.None) }, failTaskNumber: int.MaxValue /* no task failure needed here */);
Evaluation\Expander_Tests.cs (1)
4134new string[] {"$([System.Int32]::MaxValue)", System.Int32.MaxValue.ToString() },
Evaluation\ExpanderFunction_Tests.cs (3)
70const int expected = int.MaxValue; 87const double value = int.MaxValue + 1.0; 95const 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)
593_maxPath = isMaxPathRestricted ? MAX_PATH : int.MaxValue;
Microsoft.Build.Tasks.Core (2)
AssemblyDependency\TaskItemSpecFilenameComparer.cs (1)
74int.MaxValue, // all characters after the start index
StreamMappedString.cs (1)
41private int _finalPageNumber = Int32.MaxValue;
Microsoft.Build.Tasks.UnitTests (13)
GetInstalledSDKLocations_Tests.cs (12)
278t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString(); 325t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString(); 399t.TargetPlatformVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue).ToString();
QuotingUtilities.cs (1)
169return 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)
903[InlineData(int.MaxValue, false)]
Microsoft.CodeAnalysis (158)
Binding\AbstractLookupSymbolsInfo.cs (1)
24private const int reachedEndValue = int.MaxValue;
CodeGen\ILBuilderEmit.cs (2)
685if (value >= int.MinValue && value <= int.MaxValue) 704if (value >= int.MinValue && value <= int.MaxValue)
CodeGen\LocalScopeManager.cs (4)
263int begin = int.MaxValue; 287int begin = int.MaxValue; 428int begin = int.MaxValue; 473int begin = int.MaxValue;
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (1)
226|| GetBucketSize(startConstant, endConstant) > Int32.MaxValue;
CommandLine\SarifVersion.cs (1)
31Latest = int.MaxValue
EmbeddedText.cs (2)
220if (longLength > int.MaxValue) 310maxByteCount = int.MaxValue;
Emit\EditAndContinue\DeltaMetadataWriter.cs (8)
966if (xOrdinal == 0) xOrdinal = int.MaxValue; 967if (yOrdinal == 0) yOrdinal = int.MaxValue; 976Debug.Assert(xOrdinal == int.MaxValue && yOrdinal == int.MaxValue); 979xOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(x.parentHandle, out var rowIds) ? rowIds[0] : int.MaxValue; 980yOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(y.parentHandle, out rowIds) ? rowIds[0] : int.MaxValue; 989Debug.Assert(xOrdinal == int.MaxValue && yOrdinal == int.MaxValue);
EnumConstantHelper.cs (1)
73overflowKind = CheckOverflow(int.MaxValue, previous, offset);
Generated\Operations.Generated.cs (101)
4038case int.MaxValue: 4093case int.MaxValue: 4160case int.MaxValue: 4260case int.MaxValue: 4350case int.MaxValue: 4458case int.MaxValue: 4552case int.MaxValue: 4638case int.MaxValue: 4699case int.MaxValue: 4773case int.MaxValue: 4846case int.MaxValue: 4900case int.MaxValue: 4961case int.MaxValue: 5053case int.MaxValue: 5136case int.MaxValue: 5204case int.MaxValue: 5271case int.MaxValue: 5382case int.MaxValue: 5438case int.MaxValue: 5502case int.MaxValue: 5561case int.MaxValue: 5624case int.MaxValue: 5699case int.MaxValue: 5773case int.MaxValue: 5843case int.MaxValue: 5899case int.MaxValue: 5964case int.MaxValue: 6021case int.MaxValue: 6083case int.MaxValue: 6163case int.MaxValue: 6215case int.MaxValue: 6285case int.MaxValue: 6360case int.MaxValue: 6416case int.MaxValue: 6478case int.MaxValue: 6541case int.MaxValue: 6616case int.MaxValue: 6672case int.MaxValue: 6728case int.MaxValue: 6790case int.MaxValue: 6846case int.MaxValue: 6902case int.MaxValue: 6962case int.MaxValue: 7014case int.MaxValue: 7066case int.MaxValue: 7175case int.MaxValue: 7235case int.MaxValue: 7301case int.MaxValue: 7353case int.MaxValue: 7409case int.MaxValue: 7464case int.MaxValue: 7543case int.MaxValue: 7590case int.MaxValue: 7641case int.MaxValue: 7692case int.MaxValue: 7745case int.MaxValue: 7810case int.MaxValue: 7886case int.MaxValue: 7957case int.MaxValue: 8028case int.MaxValue: 8101case int.MaxValue: 8192case int.MaxValue: 8254case int.MaxValue: 8310case int.MaxValue: 8361case int.MaxValue: 8417case int.MaxValue: 8484case int.MaxValue: 8552case int.MaxValue: 8636case int.MaxValue: 8703case int.MaxValue: 8771case int.MaxValue: 8849case int.MaxValue: 8924case int.MaxValue: 9016case int.MaxValue: 9083case int.MaxValue: 9141case int.MaxValue: 9204case int.MaxValue: 9278case int.MaxValue: 9363case int.MaxValue: 9437case int.MaxValue: 9502case int.MaxValue: 9565case int.MaxValue: 9629case int.MaxValue: 9684case int.MaxValue: 9762case int.MaxValue: 9820case int.MaxValue: 9871case int.MaxValue: 9932case int.MaxValue: 10006case int.MaxValue: 10068case int.MaxValue: 10135case int.MaxValue: 10197case int.MaxValue: 10252case int.MaxValue: 10334case int.MaxValue: 10398case int.MaxValue: 10453case int.MaxValue: 10517case int.MaxValue: 10590case int.MaxValue: 10650case int.MaxValue: 10709case int.MaxValue: 10767case int.MaxValue:
InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
MetadataReference\ModuleMetadata.cs (1)
238(int)Math.Min(unmanagedMemoryStream.Length, int.MaxValue),
Operations\IOperation.OperationList.Reversed.cs (8)
97_currentSlot = int.MaxValue; 98_currentIndex = int.MaxValue; 105Debug.Assert(_operation != null && _currentSlot is >= 0 and not int.MaxValue && _currentIndex is >= 0 and not int.MaxValue); 112Debug.Assert((_currentSlot == int.MaxValue) == (_currentIndex == int.MaxValue)); 119_currentIndex = int.MaxValue; 120_currentSlot = int.MaxValue;
Operations\OperationNodes.cs (9)
58int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 60int.MaxValue or 0 or -1 => (false, -1, 0), 129int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 131int.MaxValue or 0 or -1 => (false, -1, 0), 302case int.MaxValue: 380case int.MaxValue: 466case int.MaxValue: 597case int.MaxValue: 618case int.MaxValue:
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
Symbols\CommonGeneratedNameParser.cs (1)
39if (value > int.MaxValue)
Syntax\GreenNode.cs (1)
992return code & Int32.MaxValue;
Syntax\InternalSyntax\SyntaxListBuilder.cs (2)
143requiredSize >= (int.MaxValue / 2) ? int.MaxValue :
Syntax\InternalSyntax\SyntaxNodeCache.cs (3)
281return code & Int32.MaxValue; 298return code & Int32.MaxValue; 319return code & Int32.MaxValue;
Text\CompositeText.cs (1)
261private const int MAXIMUM_SEGMENT_SIZE_FOR_COMBINING = int.MaxValue / 16;
Text\LargeText.cs (1)
66Debug.Assert(longLength > 0 && longLength <= int.MaxValue); // GetMaxCharCountOrThrowIfHuge should have thrown.
Text\TextChangeRange.cs (1)
102var start = int.MaxValue;
Microsoft.CodeAnalysis.Analyzers (4)
MetaAnalyzers\ReleaseTrackingHelper.cs (2)
41internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
Microsoft.CodeAnalysis.CodeStyle (33)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
46var fileHeaderStart = int.MaxValue;
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
30var currentOrder = preferredOrder.TryGetValue(modifier.RawKind, out var value) ? value : int.MaxValue;
src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
24/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
118if (start == int.MinValue && end == int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (4)
90var end = int.MaxValue; 120if (end != int.MaxValue) 571end = int.MaxValue; 574if (end == int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (3)
85Math.Min(LeadingTrivia.Length == 0 ? int.MaxValue : LeadingTrivia[0].GetSpan().Start, 86Math.Min(VirtualChars.Length == 0 ? int.MaxValue : VirtualChars[0].Span.Start, 87TrailingTrivia.Length == 0 ? int.MaxValue : TrailingTrivia[0].GetSpan().Start));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (1)
12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
121edgesExist ? int.MaxValue : threshold);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (5)
45private const int Infinity = int.MaxValue >> 1; 47public const int BeyondThreshold = int.MaxValue; 78public static int GetEditDistance(string source, string target, int threshold = int.MaxValue) 84public int GetEditDistance(string target, int threshold = int.MaxValue) 168public static int GetEditDistance(ReadOnlySpan<char> source, ReadOnlySpan<char> target, int threshold = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
97if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
62return int.MaxValue; 76return distance == int.MaxValue ? distance : distance + 1;
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
83=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
Microsoft.CodeAnalysis.Collections.Package (2)
Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
Microsoft.CodeAnalysis.CSharp (37)
Binder\Binder_Conversions.cs (4)
3612case SpecialType.System_Int32: return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 3618return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 3642case SpecialType.System_Int32: return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M); 3646return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M);
Binder\Binder_Operators.cs (2)
2352/// Returns ConstantValue.Bad if, and only if, the resulting string length exceeds <see cref="int.MaxValue"/>. 2365return (newLength > int.MaxValue) ? ConstantValue.Bad : ConstantValue.CreateFromRope(Rope.Concat(leftValue, rightValue));
Binder\DecisionDagBuilder.cs (3)
2255var possibleValues = fac.Related(BinaryOperatorKind.LessThanOrEqual, int.MaxValue - offset); 2271return ConstantValue.Create(offset > (int.MaxValue - value) ? int.MaxValue : value + offset);
Binder\PatternExplainer.cs (1)
676if (remainingValues.Any(BinaryOperatorKind.GreaterThan, ConstantValue.Create(int.MaxValue)))
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1757BoundLiteral intMaxValueLiteral = new BoundLiteral(syntaxNode, ConstantValue.Create(int.MaxValue), expectedAttributeType);
BoundTree\LengthBasedStringSwitchData.cs (1)
210int bestIndexLargestBucket = int.MaxValue;
LanguageVersion.cs (3)
254LatestMajor = int.MaxValue - 2, 259Preview = int.MaxValue - 1, 264Latest = int.MaxValue,
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2358if (constVal == null || constVal.UInt32Value > int.MaxValue)
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
66if (scale == 0 && int.MinValue <= value && value <= int.MaxValue)
Parser\Lexer.cs (1)
1092if (val <= Int32.MaxValue)
Symbols\LexicalSortKey.cs (6)
44public static LexicalSortKey GetSynthesizedMemberKey(int offset) => new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 2 - offset }; 51public static readonly LexicalSortKey SynthesizedCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue - 1 }; 52public static readonly LexicalSortKey SynthesizedCCtor = new LexicalSortKey() { _treeOrdinal = int.MaxValue, _position = int.MaxValue };
Symbols\MemberSymbolExtensions.cs (1)
542int minArity = Int32.MaxValue;
Symbols\OverriddenOrHiddenMembersHelpers.cs (2)
549int minCustomModifierCount = int.MaxValue; 622Debug.Assert(memberIsFromSomeCompilation || minCustomModifierCount == int.MaxValue, "Metadata members require exact custom modifier matches.");
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
516int startOfNonInterfaceArguments = int.MaxValue; 521if (startOfNonInterfaceArguments == int.MaxValue &&
Symbols\Source\SourceFixedFieldSymbol.cs (1)
112if (totalSize > int.MaxValue)
Utilities\ValueSetFactory.IntTC.cs (2)
30int INumericTC<int>.MaxValue => int.MaxValue; 55Debug.Assert(value != int.MaxValue);
Utilities\ValueSetFactory.NintValueSet.cs (2)
32/// A value of type nint may, in a 64-bit runtime, take on values greater than <see cref="System.Int32.MaxValue"/>. 35/// to contain all values greater than <see cref="System.Int32.MaxValue"/> (if any).
Utilities\ValueSetFactory.NonNegativeIntValueSetFactory.cs (3)
39if (value == int.MaxValue) 41return new NumericValueSet<int>(Math.Max(0, value + 1), int.MaxValue, tc); 43return new NumericValueSet<int>(Math.Max(0, value), int.MaxValue, tc);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
62=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
753var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
MiscTests.cs (2)
24int max = int.MaxValue; 27int y = 0 - int.MaxValue;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\Indentation\CSharpFormatterTestsBase.cs (1)
79Assert.InRange(index, 0, int.MaxValue);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenIncrementTests.cs (2)
66TestIncrementCompilationAndOutput<int>(int.MaxValue, int.MinValue); 108TestIncrementCompilationAndOutput<int>(int.MaxValue, int.MinValue);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\NumericIntPtrTests.cs (15)
2596F({(uint)int.MaxValue + 1}); 2888verify((FieldSymbol)comp.GetMember("Program.C"), int.MaxValue, signed: true, negative: false); 6292values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 6328values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 6364values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 6437values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 6473values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 6509values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 6666values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 6704values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 6742values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 9396string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
OverloadResolutionPriorityTests.cs (1)
193[InlineData(int.MaxValue)]
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
208for (int i = 0; i < int.MaxValue; i += 10)
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
62=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (52)
Semantics\NativeIntegerTests.cs (16)
797CompileAndVerify(comp, expectedOutput: $"{int.MinValue}, {int.MaxValue}, -1, 1"); 6728F({(uint)int.MaxValue + 1}); 7051verify((FieldSymbol)comp.GetMember("Program.C"), int.MaxValue, signed: true, negative: false); 9769values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 9805values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 9843values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 9918values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 9954values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 9992values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 10144values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}", 10182values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}", 10220values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}", 13761string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Semantics\RefFieldTests.cs (1)
26942[InlineData(int.MaxValue)]
Utilities\ValueSetTests.cs (35)
33[InlineData(int.MaxValue)] 37Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString()); 45int i1 = Random.Next(int.MinValue, int.MaxValue); 47Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString()); 62[InlineData(int.MaxValue)] 66Assert.Equal((i1 == int.MaxValue) ? "" : $"[{i1 + 1}..{int.MaxValue}]", values.ToString()); 74int i1 = Random.Next(int.MinValue, int.MaxValue); 76Assert.Equal($"[{i1 + 1}..{int.MaxValue}]", values.ToString()); 91[InlineData(int.MaxValue)] 103int i1 = Random.Next(int.MinValue, int.MaxValue) + 1; 120[InlineData(int.MaxValue)] 132int i1 = Random.Next(int.MinValue, int.MaxValue) + 1; 149[InlineData(int.MaxValue)] 161int i1 = Random.Next(int.MinValue, int.MaxValue); 172int i1 = Random.Next(int.MinValue + 1, int.MaxValue); 173int i2 = Random.Next(int.MinValue, int.MaxValue); 187int i1 = Random.Next(int.MinValue + 1, int.MaxValue); 188int i2 = Random.Next(int.MinValue, int.MaxValue); 203int i1 = Random.Next(int.MinValue + 1, int.MaxValue); 204int i2 = Random.Next(int.MinValue, int.MaxValue); 208Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString()); 219int i1 = Random.Next(int.MinValue + 1, int.MaxValue); 220int i2 = Random.Next(int.MinValue, int.MaxValue); 223Assert.Equal($"[{int.MinValue}..{int.MaxValue}]", values1.ToString()); 234int i1 = Random.Next(int.MinValue + 1, int.MaxValue); 235int i2 = Random.Next(int.MinValue, int.MaxValue); 239Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString()); 251int i1 = Random.Next(int.MinValue, int.MaxValue); 252int i2 = Random.Next(int.MinValue, int.MaxValue); 260test(int.MaxValue); 280int i1 = Random.Next(int.MinValue, int.MaxValue); 281int i2 = Random.Next(int.MinValue, int.MaxValue); 788int j = Random.Next(0, int.MaxValue - 1); 834int j = Random.Next(0, int.MaxValue - 1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (26)
Compilation\CompilationAPITests.cs (5)
835Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 836Assert.InRange(comp.GetDeclarationDiagnostics().Count(), 0, int.MaxValue); 889Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 899Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 907Assert.InRange(error.Count(), 1, int.MaxValue);
Compilation\CSharpCompilationOptionsTests.cs (12)
168new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithOutputKind((OutputKind)Int32.MaxValue).VerifyErrors( 170Diagnostic(ErrorCode.ERR_BadCompilationOptionValue).WithArguments("OutputKind", Int32.MaxValue.ToString())); 176new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithOptimizationLevel((OptimizationLevel)Int32.MaxValue).VerifyErrors( 178Diagnostic(ErrorCode.ERR_BadCompilationOptionValue).WithArguments("OptimizationLevel", Int32.MaxValue.ToString())); 184new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((Platform)Int32.MaxValue).VerifyErrors( 186Diagnostic(ErrorCode.ERR_BadPlatformType).WithArguments(Int32.MaxValue.ToString())); 245new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithWarningLevel(int.MaxValue).VerifyErrors(); 318new CSharpCompilationOptions(outputKind: (OutputKind)Int32.MaxValue).VerifyErrors( 320Diagnostic(ErrorCode.ERR_BadCompilationOptionValue).WithArguments("OutputKind", Int32.MaxValue.ToString())); 326new CSharpCompilationOptions(OutputKind.ConsoleApplication, optimizationLevel: (OptimizationLevel)Int32.MaxValue).VerifyErrors( 328Diagnostic(ErrorCode.ERR_BadCompilationOptionValue).WithArguments("OptimizationLevel", Int32.MaxValue.ToString())); 343new CSharpCompilationOptions(OutputKind.ConsoleApplication, warningLevel: int.MaxValue).VerifyErrors();
Compilation\GetSemanticInfoTests.cs (4)
924EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((int)int.MaxValue)); 925EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 926EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
DocumentationComments\MethodDocumentationCommentTests.cs (1)
208Assert.InRange(members.Length, 1, int.MaxValue);
SymbolDisplay\SymbolDisplayTests.cs (3)
7081Assert.InRange(EnumField.Comparer.Compare(lhs, rhs), 1, int.MaxValue); 7085Assert.InRange(EnumField.Comparer.Compare(lhs, rhs), 1, int.MaxValue); 7093Assert.InRange(EnumField.Comparer.Compare(lhs, rhs), 1, int.MaxValue);
Symbols\Metadata\PE\TypeForwarders.cs (1)
1796Assert.InRange(numParts, 1, int.MaxValue);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Diagnostics\DiagnosticTest.cs (1)
149Assert.InRange(actualErrors.Count(), 1, int.MaxValue);
LexicalAndXml\LexicalTests.cs (3)
2583var text = Int32.MaxValue.ToString(); 2591Assert.Equal(Int32.MaxValue, token.Value); 2613var value = ((uint)Int32.MaxValue) + 1;
LexicalAndXml\PreprocessorTests.cs (1)
398Assert.InRange(actual.Count, expected.Length, int.MaxValue);
Syntax\SyntaxFactoryTests.cs (1)
334CheckLiteralToString(int.MaxValue, @"2147483647");
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
753var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
70VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(int.MaxValue), "global::System.Int32.MaxValue");
Microsoft.CodeAnalysis.EditorFeatures (4)
CommentSelection\AbstractCommentSelectionBase.cs (2)
206var indentToCommentAt = int.MaxValue; 213: int.MaxValue;
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.cs (1)
117=> AdjustSnapshotSpan(span, minimumLength, maximumLength: int.MaxValue);
NavigationBar\NavigationBarController_ModelComputation.cs (1)
219var nextItemStart = int.MaxValue;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Completion\AbstractArgumentProviderTests`1.cs (1)
116=> parameters.Any(parameter => parameter.IsParams) ? int.MaxValue : parameters.Length;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
ResultProviderTestBase.cs (1)
225Assert.InRange(totalChildCount, 0, int.MaxValue);
Microsoft.CodeAnalysis.Features (13)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
93var codeActions = addImportService.GetCodeActionsForFixes(document, fixes, packageInstallerService, maxResults: int.MaxValue);
CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
95AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
Completion\MatchPriority.cs (1)
36public static readonly int Preselect = int.MaxValue / 2;
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (2)
266const int MaxValueDiv10 = int.MaxValue / 10; 267const int MaxValueMod10 = int.MaxValue % 10;
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
156index1 = index1 < 0 ? int.MaxValue : index1; 157index2 = index2 < 0 ? int.MaxValue : index2;
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
46var fileHeaderStart = int.MaxValue;
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
30var currentOrder = preferredOrder.TryGetValue(modifier.RawKind, out var value) ? value : int.MaxValue;
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
62return int.MaxValue; 76return distance == int.MaxValue ? distance : distance + 1;
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
83=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
181parentTitle, WrappingStyle.WrapFirst_IndentRest, wrappingColumn: int.MaxValue, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.InteractiveHost (9)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
24/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Features\UnifiedSuggestions\UnifiedSuggestedActionSetComparer.cs (1)
25return int.MaxValue;
Protocol\Extensions\VSDiagnosticTags.cs (9)
15public const DiagnosticTag BuildError = (DiagnosticTag)(int.MaxValue - 1); 20public const DiagnosticTag IntellisenseError = (DiagnosticTag)(int.MaxValue - 2); 30public const DiagnosticTag PotentialDuplicate = (DiagnosticTag)(int.MaxValue - 3); 35public const DiagnosticTag HiddenInErrorList = (DiagnosticTag)(int.MaxValue - 4); 40public const DiagnosticTag VisibleInErrorList = (DiagnosticTag)(int.MaxValue - 5); 45public const DiagnosticTag HiddenInEditor = (DiagnosticTag)(int.MaxValue - 6); 50public const DiagnosticTag SuppressEditorToolTip = (DiagnosticTag)(int.MaxValue - 7); 56public const DiagnosticTag EditAndContinueError = (DiagnosticTag)(int.MaxValue - 8); 61public const DiagnosticTag TaskItem = (DiagnosticTag)(int.MaxValue - 9);
Protocol\Internal\VSInternalItemOrigin.cs (1)
45Other = int.MaxValue,
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteSolutionCache.cs (1)
64_cacheHitIndexHistogram = new(bucketSize: 1, maxBucketValue: int.MaxValue, bucketCount: _totalHistory + 1);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
RemoteHostAssetWriter.cs (1)
183Contract.ThrowIfTrue(length > int.MaxValue);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
Microsoft.CodeAnalysis.Scripting (3)
Hosting\ObjectFormatter\CommonObjectFormatter.Builder.cs (1)
91public void Append(string str, int start = 0, int count = Int32.MaxValue)
Hosting\ObjectFormatter\CommonObjectFormatter.cs (1)
46maximumLineLength: int.MaxValue,
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
215var formatted = bound is >= int.MinValue and <= int.MaxValue
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
ObjectFormatterTestBase.cs (1)
16protected static PrintOptions SeparateLinesOptions => new PrintOptions { MemberDisplayFormat = MemberDisplayFormat.SeparateLines, MaximumOutputLength = int.MaxValue };
TestCSharpObjectFormatter.cs (1)
20public TestCSharpObjectFormatter(bool includeCodePoints = false, bool quoteStringsAndCharacters = true, int maximumLineLength = int.MaxValue, CultureInfo cultureInfo = null)
TestVisualBasicObjectFormatter.cs (1)
21int maximumLineLength = int.MaxValue,
Microsoft.CodeAnalysis.Test.Utilities (4)
Assert\AssertEx.cs (1)
405int closestDistance = int.MaxValue;
Diagnostics\OperationTestAnalyzer.cs (3)
402int rangeMinValue = int.MaxValue; 423rangeMaxValue = int.MaxValue; 427rangeMaxValue = int.MaxValue;
Microsoft.CodeAnalysis.Threading.Package (3)
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
TestHooks\IExpeditableDelaySource.cs (1)
24/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
Microsoft.CodeAnalysis.UnitTests (30)
Collections\HashSet\SegmentedHashSet_Generic_Tests`1.cs (5)
538Assert.InRange(set.EnsureCapacity(requestedCapacity), requestedCapacity, int.MaxValue); 597Assert.InRange(set.EnsureCapacity(setLength - 1), setLength, int.MaxValue); 612Assert.InRange(newCapacity, currentCapacity * 2, int.MaxValue); 665Assert.InRange(c.EqualsCalls, 1, int.MaxValue); 666Assert.InRange(c.GetHashCodeCalls, 1, int.MaxValue);
Collections\ImmutablesTestBase.cs (1)
173Assert.InRange(length, 0, int.MaxValue);
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
156public int Count => int.MaxValue;
Collections\List\SegmentedList.Generic.Tests.Find.cs (6)
77Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(int.MaxValue, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException" 107Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException" 122Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException" 167Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException" 182Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(list.Count - 1, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException" 221Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MaxValue, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
Collections\List\SegmentedList.Generic.Tests.Misc.cs (3)
72int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue }; 112int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue }; 184int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue };
Collections\List\SegmentedList.Generic.Tests.Sort.cs (1)
195Tuple.Create(int.MaxValue, 0),
Collections\RopeTests.cs (1)
139Assert.Equal(int.MaxValue, all.Length);
EmbeddedTextTests.cs (1)
283public override long Length => (long)int.MaxValue + 1;
InternalUtilities\JsonWriterTests.cs (1)
30[InlineData("2147483647", int.MaxValue)]
MetadataReferences\AssemblyIdentityTests.cs (5)
238new Version(int.MaxValue, 0, 0, 0), 239new Version(0, int.MaxValue, 0, 0), 240new Version(0, 0, int.MaxValue, 0), 241new Version(0, 0, 0, int.MaxValue), 248Assert.Throws<ArgumentOutOfRangeException>(() => new AssemblyIdentity("Goo", contentType: (AssemblyContentType)int.MaxValue));
MetadataReferences\ModuleMetadataTests.cs (1)
369var stream = new MockUnmanagedMemoryStream(assemblyPtr, (long)int.MaxValue + 1)
RealParserTests.cs (1)
480TestRoundTripFloat((float)int.MaxValue);
Text\TextSpanTest.cs (3)
122TextSpan span = new TextSpan(0, int.MaxValue - 1); 124Assert.Equal(int.MaxValue - 1, span.End); 125Assert.Equal(int.MaxValue - 1, span.Length);
Microsoft.CodeAnalysis.VisualBasic (8)
BoundTree\BoundExpressionExtensions.vb (1)
435If expression.ConstantValueOpt.Int64Value <= Integer.MaxValue AndAlso expression.ConstantValueOpt.Int64Value >= Integer.MinValue Then
LanguageVersion.vb (1)
26Latest = Integer.MaxValue
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (1)
177Dim outermostScopeDepth As Integer = Integer.MaxValue
Semantics\Operators.vb (1)
1522If newLength > Integer.MaxValue Then
Symbols\Retargeting\RetargetingSymbolTranslator.vb (2)
414Dim startOfNonInterfaceArguments As Integer = Integer.MaxValue 418If startOfNonInterfaceArguments = Integer.MaxValue AndAlso
Syntax\InternalSyntax\SyntaxNodeFactories.vb (1)
44useIntegerType = (value <= Integer.MaxValue)
Syntax\VisualBasicLineDirectiveMap.vb (1)
53mappedLine = CInt(Math.Min(CLng(extSourceDirective.LineStart.Value), Integer.MaxValue) - 1)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (1)
4113Assert.InRange(fileContents.Length, 4, Integer.MaxValue)
MiscTests.vb (1)
14Dim max = Integer.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Semantics\GetSemanticInfoTests.vb (1)
4071Assert.InRange(diagnostics.Length(), 1, Integer.MaxValue)
Semantics\OverloadResolution.vb (3)
2515Assert.InRange(numericTypesPrecedence(i), prev + 1, Integer.MaxValue) 2884Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing) 3075Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing)
Semantics\OverloadResolutionPriorityTests.vb (1)
1946<InlineData(Integer.MaxValue)>
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
DocumentationComments\MethodDocumentationCommentTests.vb (1)
208Assert.InRange(members.Length, 1, Integer.MaxValue)
SymbolsTests\Metadata\PE\TypeForwarders.vb (1)
1223Assert.InRange(numParts, 1, Integer.MaxValue)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.vb (1)
71CheckLiteralToString(Integer.MaxValue, "2147483647")
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
66VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Integer.MaxValue), "Global.System.Int32.MaxValue")
Microsoft.CodeAnalysis.Workspaces (39)
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
246? int.MaxValue
Log\StatisticResult.cs (1)
22var min = int.MaxValue;
Rename\ConflictEngine\ConflictResolver.cs (1)
416.ThenBy(l => l.IsInSource ? l.SourceSpan.Start : int.MaxValue);
Serialization\SerializerService_Reference.cs (1)
23private const int MetadataFailed = int.MaxValue;
Shared\Utilities\DocumentationComment.cs (2)
194var maxPrefix = int.MaxValue; 210if (maxPrefix == int.MaxValue)
src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
24/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
118if (start == int.MinValue && end == int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (4)
90var end = int.MaxValue; 120if (end != int.MaxValue) 571end = int.MaxValue; 574if (end == int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (3)
85Math.Min(LeadingTrivia.Length == 0 ? int.MaxValue : LeadingTrivia[0].GetSpan().Start, 86Math.Min(VirtualChars.Length == 0 ? int.MaxValue : VirtualChars[0].Span.Start, 87TrailingTrivia.Length == 0 ? int.MaxValue : TrailingTrivia[0].GetSpan().Start));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (1)
12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
121edgesExist ? int.MaxValue : threshold);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (5)
45private const int Infinity = int.MaxValue >> 1; 47public const int BeyondThreshold = int.MaxValue; 78public static int GetEditDistance(string source, string target, int threshold = int.MaxValue) 84public int GetEditDistance(string target, int threshold = int.MaxValue) 168public static int GetEditDistance(ReadOnlySpan<char> source, ReadOnlySpan<char> target, int threshold = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
Storage\SQLite\v2\SQLitePersistentStorage_Helpers.cs (1)
21if (stream.Length is >= 0 and <= int.MaxValue)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (9)
src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
45internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 90internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 114internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 140internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 165internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Dependencies\Collections\Internal\HashHelpers.cs (2)
72for (var i = (min | 1); i < int.MaxValue; i += 2) 111Debug.Assert(divisor <= int.MaxValue);
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
ObjectSerializationTests.cs (9)
281TestRoundTripValue(Int32.MaxValue); 327TestRoundTripValue<Int32>(Int32.MaxValue); 346TestRoundTripValue<Int32>(Int32.MaxValue); 371TestRoundTripValue<Int64>(Int32.MaxValue); 396TestRoundTripValue<UInt64>(Int32.MaxValue); 416writer.WriteInt32(Int32.MaxValue); 440Assert.Equal(Int32.MaxValue, reader.ReadInt32()); 470writer.WriteScalarValue(Int32.MaxValue); 508Assert.Equal(Int32.MaxValue, (Int32)reader.ReadScalarValue());
SymbolKeyTests.cs (1)
70TestVersion(symbol, compilation, int.MaxValue);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1535if (value <= int.MaxValue)
Microsoft.Data.Analysis (6)
DataFrame.Arrow.cs (1)
188int recordBatchLength = Int32.MaxValue;
DataFrame.cs (1)
343int shuffleUpperLimit = (int)Math.Min(Int32.MaxValue, Rows.Count);
DataFrameColumns\ArrowStringDataFrameColumn.cs (1)
334Debug.Assert(indexInBuffer <= Int32.MaxValue);
PrimitiveDataFrameColumnComputations.cs (3)
2795var ret = int.MaxValue; 3012var value = int.MaxValue; 3035var value = int.MaxValue;
Microsoft.Data.Analysis.Tests (5)
PrimitiveDataFrameColumnTests.cs (1)
479PrimitiveDataFrameColumn<byte> intColumn = new PrimitiveDataFrameColumn<byte>("Byte1", int.MaxValue / 2 - 1);
TextFieldParserTests.cs (4)
109parser.SetFieldWidths(new[] { 1, 2, int.MaxValue }); 110Assert.Equal(new[] { 1, 2, int.MaxValue }, parser.FieldWidths); 111parser.SetFieldWidths(new[] { int.MaxValue, 3 }); 112Assert.Equal(new[] { int.MaxValue, 3 }, parser.FieldWidths);
Microsoft.DotNet.Arcade.Sdk.Tests (1)
CalculateAssemblyAndFileVersionsTests.cs (1)
33[InlineData("65535.65535.65535", int.MaxValue, "65535.65535.42949.33647")]
Microsoft.DotNet.Build.Tasks.Feed.Tests (7)
PublishArtifactsInManifestTests.cs (7)
185[InlineData("QXJjYWRl", "QXJjYWRl", new int[] { int.MaxValue }, new int[] { int.MaxValue }, 1024)] 187[InlineData("QXJjYWRl", "QXJjYWRm", new int[] { int.MaxValue }, new int[] { int.MaxValue }, 1024)] 189[InlineData("QXJjYWRl", "QXJjYWRl", new int[] { int.MaxValue }, new int[] { 1, 1, 1, 1, 1 }, 1024)] 191[InlineData("QXJjYWRl", "QXJjYWRm", new int[] { int.MaxValue }, new int[] { 1, 1, 1, 1, 1 }, 1024)] 231int maxStreamBytesThisCall = int.MaxValue;
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.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
421IntEnum = (IntEnum)int.MaxValue, 425StringEnumUsingIntConverter = (StringEnum)int.MaxValue,
Microsoft.Extensions.Caching.Hybrid (4)
Internal\HybridCachePayload.cs (3)
221if (!TryRead7BitEncodedInt64(ref bytes, out u64) || u64 > int.MaxValue) // payload length 241if (!TryRead7BitEncodedInt64(ref bytes, out u64) || u64 > int.MaxValue) // tag count 342|| u64Length > int.MaxValue
Internal\RecyclableArrayBufferWriter.cs (1)
177if ((uint)newSize > int.MaxValue)
Microsoft.Extensions.Caching.Hybrid.Tests (8)
BufferReleaseTests.cs (3)
128using (RecyclableArrayBufferWriter<byte> writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue)) 191using (RecyclableArrayBufferWriter<byte> writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue)) 264var target = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue);
DistributedCacheTests.cs (2)
187var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 249var writer = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue);
SerializerTests.cs (3)
19using var target = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 33using var target = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue); 275using var target = RecyclableArrayBufferWriter<byte>.Create(int.MaxValue);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
ResourceMonitoringServiceTests.cs (2)
112CollectionWindow = TimeSpan.FromMilliseconds(int.MaxValue), 113SamplingInterval = TimeSpan.FromMilliseconds(int.MaxValue)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggerTest.cs (1)
1022Assert.InRange(int.Parse(actualValue), 0, int.MaxValue);
Microsoft.Extensions.Http.Resilience (3)
Routing\OrderedGroupsRoutingOptions.cs (1)
25[System.ComponentModel.DataAnnotations.Length(1, int.MaxValue)]
Routing\UriEndpointGroup.cs (1)
25[System.ComponentModel.DataAnnotations.Length(1, int.MaxValue)]
Routing\WeightedGroupsRoutingOptions.cs (1)
31[System.ComponentModel.DataAnnotations.Length(1, int.MaxValue)]
Microsoft.Extensions.Logging.AzureAppServices (1)
BatchingLoggerProvider.cs (1)
92var limit = _batchSize ?? int.MaxValue;
Microsoft.Extensions.Telemetry (2)
Sampling\RandomProbabilisticSampler.cs (2)
56return RandomNumberGenerator.GetInt32(int.MaxValue) < int.MaxValue * probability;
Microsoft.Gen.Logging.Generated.Tests (7)
LogPropertiesTests.cs (2)
217TransitiveVirtualProp = int.MaxValue, 568var recordToLog = new MyReadonlyRecordStruct(int.MaxValue, Guid.NewGuid().ToString());
TagProviderTests.cs (1)
374classToLog1.MyIntProperty = int.MaxValue;
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (1)
80public int IntegerProperty { get; set; } = int.MaxValue;
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesRedactionExtensions.cs (1)
49public int TransitiveNumberProp { get; set; } = int.MaxValue;
test\Generators\Microsoft.Gen.Logging\TestClasses\TagProviderExtensions.cs (1)
14[LoggerMessage(int.MaxValue, LogLevel.Warning, "Custom provided properties for {Param}.")]
test\Generators\Microsoft.Gen.Logging\TestClasses\TagProviderWithObjectExtensions.cs (1)
12[LoggerMessage(int.MaxValue, LogLevel.Warning, "Custom provided properties for {Param}.")]
Microsoft.Gen.Metrics.Generated.Tests (5)
MetricTests.cs (5)
63const long Value = int.MaxValue + 4L; 90const long Value = int.MaxValue + 3L; 118const int Value = int.MaxValue - 1; 160const long Value = int.MaxValue + 2L; 184const long Value = int.MaxValue + 1L;
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSSignatureContext.cs (1)
61typesHash = (int)(hash & int.MaxValue);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
565return index == -1 ? int.MaxValue : index;
Microsoft.Maui (1)
Animations\AnimationManager.cs (1)
68 Environment.TickCount & int.MaxValue;
Microsoft.Maui.Controls (7)
IndicatorView\IndicatorView.cs (1)
31 public static readonly BindableProperty MaximumVisibleProperty = BindableProperty.Create(nameof(MaximumVisible), typeof(int), typeof(IndicatorView), int.MaxValue, propertyChanged: (bindable, oldValue, newValue)
InputView\InputView.cs (1)
29 public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(InputView), int.MaxValue);
Internals\ImageParser.cs (1)
462 LoopCount = int.MaxValue;
LegacyLayouts\Layout.cs (1)
571 InvalidateMeasureLegacy(trigger, depth, int.MaxValue);
ListProxy.cs (1)
32 internal ListProxy(IEnumerable enumerable, int windowSize = int.MaxValue, IDispatcher dispatcher = null)
PlatformConfiguration\AndroidSpecific\TabbedPage.cs (1)
171 return int.MaxValue;
TemplatedItemsList.cs (1)
76 internal TemplatedItemsList(TemplatedItemsList<TView, TItem> parent, IEnumerable itemSource, TView itemsView, BindableProperty itemTemplateProperty, int windowSize = int.MaxValue)
Microsoft.Maui.Controls.Build.Tasks (1)
MethodBodyExtensions.cs (1)
37 if (l < int.MinValue || l > int.MaxValue)
Microsoft.ML.AutoML (4)
API\ExperimentSettings.cs (1)
73MaxModels = int.MaxValue;
TrainerExtensions\SweepableParams.cs (1)
59new SweepableLongParam("MaximumNumberOfIterations", 1, int.MaxValue),
Utils\UserInputValidationUtil.cs (2)
284private static string ClosestNamed(IDataView trainData, string columnName, int maxAllowableEditDistance = int.MaxValue) 286var minEditDistance = int.MaxValue;
Microsoft.ML.Core (18)
Data\AnnotationUtils.cs (1)
170Interlocked.CompareExchange(ref _scoreColumnSetIdType, new KeyDataViewType(typeof(uint), int.MaxValue), null) ??
Data\ColumnTypeExtensions.cs (1)
37ectx.Check(count <= int.MaxValue, nameof(KeyDataViewType) + "." + nameof(KeyDataViewType.Count) + " exceeds int.MaxValue.");
Data\DataKind.cs (2)
179return int.MaxValue; 206return int.MaxValue;
Data\KeyTypeExtensions.cs (1)
20ectx.Check(key.Count <= int.MaxValue, nameof(KeyDataViewType) + "." + nameof(KeyDataViewType.Count) + " exceeds int.MaxValue.");
Data\ModelHeader.cs (3)
417Contracts.CheckDecode(header.CbStringTable / sizeof(long) < int.MaxValue); 506Contracts.Assert(cstr < int.MaxValue); 523Contracts.CheckDecode(cch < int.MaxValue);
Data\Repository.cs (1)
540ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory");
Utilities\BigArray.cs (2)
445Contracts.Assert((min >> BlockSizeBits) < int.MaxValue); 454Contracts.Assert((lim >> BlockSizeBits) < int.MaxValue);
Utilities\DoubleParser.cs (1)
705Contracts.Assert(Math.Abs(exp) < int.MaxValue);
Utilities\FloatUtils.cs (2)
84exp = int.MaxValue; 277exp = int.MaxValue;
Utilities\Random.cs (1)
41return random.Next(int.MinValue, int.MaxValue);
Utilities\Stats.cs (3)
26if (rangeSize < int.MaxValue) 29Contracts.Check(rangeSize <= (long)int.MaxValue * int.MaxValue,
Microsoft.ML.Core.Tests (1)
UnitTests\DataTypes.cs (1)
160int maxValue = int.MaxValue;
Microsoft.ML.Data (31)
Data\Conversion.cs (2)
1258TryParseSigned(I4.MaxValue, in src, out long? res); 1469TryParseSigned(I4.MaxValue, in src, out long? res);
DataLoadSave\Binary\BinaryLoader.cs (4)
243if (numBlocks > int.MaxValue) 326ch.CheckDecode(0 < mtocCount && mtocCount < int.MaxValue, 1276_rowsPerBlock = int.MaxValue; 1540Contracts.Assert(lim - min <= int.MaxValue);
DataLoadSave\Binary\BinarySaver.cs (1)
761int maxRowsPerBlock = _maxRowsPerBlock.GetValueOrDefault(int.MaxValue);
DataLoadSave\Binary\CodecFactory.cs (1)
132Contracts.Check(mem.Length <= int.MaxValue); // Is this even possible in the current implementation of MemoryStream?
DataLoadSave\Binary\MemoryStreamPool.cs (1)
47_pools = new MemoryStreamPool[IndexFor(int.MaxValue) + 1];
DataLoadSave\Text\TextLoader.cs (1)
1115private const int SrcLim = int.MaxValue;
DataLoadSave\Text\TextLoaderParser.cs (3)
739minSize = int.MaxValue; 742var impl = new HelperImpl(stats, parent._flags, parent._separators, parent._escapeChar, 0, int.MaxValue); 778var impl = new HelperImpl(stats, parent._flags, parent._separators, parent._escapeChar, parent._inputSize, int.MaxValue);
DataLoadSave\Text\TextSaver.cs (1)
578minLen = int.MaxValue;
DataLoadSave\Transpose\TransposeLoader.cs (1)
711Contracts.Assert(pos <= int.MaxValue);
DataView\AppendRowsDataView.cs (1)
94if (count == null || count < 0 || count > int.MaxValue)
DataView\CacheDataView.cs (4)
1360Ctx.Assert(0 <= _rowCount && _rowCount < int.MaxValue); 1392Ctx.Assert(_indexBoundaries[idx + 1] - _indexBoundaries[idx] <= int.MaxValue); 1394Ctx.Assert(_valueBoundaries[idx + 1] - _valueBoundaries[idx] <= int.MaxValue); 1440Contracts.Assert(0 <= _rowCount && _rowCount < int.MaxValue);
Prediction\Calibrator.cs (1)
2134[TlcModule.Range(Inf = 0, Max = int.MaxValue)]
Scorers\RowToRowScorerBase.cs (1)
155if (inputs.Length == 1 && n > 1 && WantParallelCursors(predicate) && (Source.GetRowCount() ?? int.MaxValue) > n)
Transforms\Hashing.cs (1)
215invertHashMaxCount = int.MaxValue;
Transforms\SlotsDroppingTransformer.cs (4)
363slotsMax[j] = range.Max ?? int.MaxValue - 1; 396slotsMax[i][j] = range.max ?? int.MaxValue - 1; 429if (!(0 <= slotsMin[iinfo][i] && slotsMin[iinfo][i] < int.MaxValue)) 431if (!(0 <= slotsMax[iinfo][i] && slotsMax[iinfo][i] < int.MaxValue))
Transforms\ValueMapping.cs (2)
535if (keyMax < int.MaxValue) 752ectx.CheckDecode(size <= int.MaxValue);
Transforms\ValueToKeyMappingTransformer.cs (1)
487var trainer = Trainer.Create(cursor, 0, autoConvert, int.MaxValue, bldr);
Utils\SequencePool.cs (1)
71Contracts.CheckDecode(0 <= _idLim && _idLim < int.MaxValue);
Microsoft.ML.FastTree (14)
Dataset\Dataset.cs (1)
617thresh[i] = (int)(cumulative * int.MaxValue);
FastTree.cs (1)
798if (FastTreeTrainerOptions.TestFrequency != int.MaxValue && (Ensemble.NumTrees % FastTreeTrainerOptions.TestFrequency == 0 || Ensemble.NumTrees == FastTreeTrainerOptions.NumberOfTrees))
FastTreeArguments.cs (1)
615public int TestFrequency = int.MaxValue;
FastTreeRanking.cs (1)
238if (FastTreeTrainerOptions.TestFrequency != int.MaxValue)
FastTreeRegression.cs (1)
259if (FastTreeTrainerOptions.TestFrequency != int.MaxValue)
FastTreeTweedie.cs (1)
238if (FastTreeTrainerOptions.TestFrequency != int.MaxValue)
Training\RegressionTreeNodeDocuments.cs (5)
100_nodeCount = int.MaxValue; 147int nodeCount = int.MaxValue; 163if (!double.IsNaN(_weightedOutput) && _nodeCount != int.MaxValue) 175int lteDocCount = int.MaxValue; 177int gtDocCount = int.MaxValue;
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (2)
1200myFeature = int.MaxValue; 1203otherFeature = int.MaxValue;
Utils\PseudorandomFunction.cs (1)
22_data = _periodics.Select(x => Enumerable.Range(0, x).Select(y => rand.Next(-1, int.MaxValue) + 1).ToArray()).ToArray();
Microsoft.ML.ImageAnalytics (4)
ImageLoader.cs (1)
305if (fileLength > int.MaxValue)
ImagePixelExtractor.cs (2)
275if ((long)imageType.Height * imageType.Width > int.MaxValue / 4) 467Contracts.Assert((long)height * width <= int.MaxValue / 4);
ImageType.cs (1)
80Contracts.CheckParam((long)height * width <= int.MaxValue / 4, nameof(height), nameof(height) + " * " + nameof(width) + " is too large.");
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
71int shortestSymbol = int.MaxValue;
Microsoft.ML.LightGbm (5)
LightGbmArguments.cs (3)
81[TlcModule.Range(Min = 0, Max = int.MaxValue)] 110[TlcModule.Range(Min = 0, Max = int.MaxValue)] 270[TlcModule.Range(Inf = 0, Max = int.MaxValue)]
LightGbmTrainerBase.cs (2)
201[TlcModule.Range(Inf = 0, Max = int.MaxValue)] 209[TlcModule.Range(Inf = 0, Max = int.MaxValue)]
Microsoft.ML.Mkl.Components (3)
OlsLinearRegression.cs (1)
421if ((long)m * (m + 1) / 2 > int.MaxValue)
VectorWhitening.cs (2)
324if ((long)cslot * actualRowCounts[i] > int.MaxValue) 326actualRowCounts[i] = int.MaxValue / cslot;
Microsoft.ML.OnnxTransformer (2)
OnnxTypeParser.cs (1)
173if (dim.DimValue > int.MaxValue)
OnnxUtils.cs (1)
258using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, recursionLimit))
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
471if (numBlocks > int.MaxValue)
Microsoft.ML.Predictor.Tests (2)
TestTransposer.cs (2)
169builder.AddColumn("E", NumberDataViewType.UInt32, GenerateHelper(rowCount, 0.1, rgen, () => (uint)rgen.Next(int.MinValue, int.MaxValue))); 235builder.AddColumn("E", NumberDataViewType.UInt32, GenerateHelper(rowCount, 0.1, rgen, () => (uint)rgen.Next(int.MinValue, int.MaxValue)));
Microsoft.ML.StandardTrainers (16)
LdSvm\LdSvmTrainer.cs (1)
135[Range(1, int.MaxValue, 1, true)]
Optimizer\LineSearch.cs (1)
259MaxNumSteps = int.MaxValue;
Optimizer\OptimizationMonitor.cs (2)
143public MeanImprovementCriterion(float tol = (float)1e-4, float lambda = (float)0.5, int maxIterations = int.MaxValue) 222public MeanRelativeImprovementCriterion(float tol = (float)1e-4, int n = 5, int maxIterations = int.MaxValue)
Standard\LinearModelParameters.cs (1)
543Statistics?.SaveSummaryInKeyValuePairs(schema.Feature.Value, int.MaxValue, results);
Standard\LogisticRegression\LbfgsPredictorBase.cs (5)
84[TlcModule.SweepableLongParamAttribute("MaxIterations", 1, int.MaxValue)] 85[Range(1, int.MaxValue, 1, true)] 151public const int MaximumNumberOfIterations = int.MaxValue; 620ch.Assert(cursor.KeptRowCount <= int.MaxValue); 632if (cursor.KeptRowCount >= int.MaxValue)
Standard\LogisticRegression\LogisticRegression.cs (1)
307if (hessianDimension > int.MaxValue || LbfgsTrainerOptions.ComputeStandardDeviation == null)
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (2)
157e.SetProgress(0, examplesProcessed, int.MaxValue); 162if (cursor.Row.Position > int.MaxValue)
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
295Host.CheckDecode(count <= int.MaxValue);
Standard\SdcaBinary.cs (2)
360checkFrequency = int.MaxValue; 2046checkFrequency = int.MaxValue;
Microsoft.ML.TestFrameworkCommon (1)
TestCommon.cs (1)
249Assert.False(size > int.MaxValue, $"{nameof(KeyDataViewType)}.{nameof(KeyDataViewType.Count)} is larger than int.MaxValue");
Microsoft.ML.Tests (18)
CollectionsDataViewTest.cs (2)
113fInt = int.MaxValue - 1, 128fInt = int.MaxValue,
OnnxConversionTest.cs (1)
1736using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10))
SvmLightTests.cs (1)
485$"-1 2:5 {(long)int.MaxValue + 2}:0.34"
TextLoaderTests.cs (2)
36string.Format("{0},{1},{2},{3}", sbyte.MaxValue, short.MaxValue, int.MaxValue, long.MaxValue), 56int[] intTargets = new int[] { int.MinValue, int.MaxValue, default };
Transformers\ConvertTests.cs (3)
155AC = new []{ int.MinValue, int.MaxValue}, 223AC = new []{ int.MinValue, int.MaxValue}, 235ConvC = new float[] { int.MinValue, int.MaxValue },
Transformers\CopyColumnEstimatorTests.cs (1)
151Assert.InRange<ulong>(key.Count, 0, int.MaxValue);
Transformers\HashTests.cs (3)
243HashTestCore((uint)value, new KeyDataViewType(typeof(uint), int.MaxValue - 1), eKey, eoKey, e3Key, ecKey, 0); 251if (value <= int.MaxValue) 269HashTestCore(value, new KeyDataViewType(typeof(ulong), int.MaxValue - 1), eKey, eoKey, e3Key, ecKey, 0);
Transformers\NormalizerTests.cs (3)
1109static List<float> GenerateRandomFloats(int num, int min = int.MinValue, int max = int.MaxValue, int seed = 0) 1188temp = rand.Next(int.MinValue, int.MaxValue); 1262temp = rand.Next(int.MinValue, int.MaxValue);
Transformers\ValueMappingTests.cs (2)
473new KeyValuePair<string, ulong>("bar", Int32.MaxValue + 1L), 492Assert.Equal<ulong>(Int32.MaxValue + 1L, dValue);
Microsoft.ML.Tokenizers (44)
EncodeSettings.cs (1)
15public EncodeSettings() { MaxTokenCount = int.MaxValue; }
Model\BPETokenizer.cs (1)
632private int CountTokens(string? text, ReadOnlySpan<char> textSpan, bool considerPreTokenization, bool considerNormalization, out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue)
Model\CodeGenTokenizer.cs (2)
578int maxTokenCount = int.MaxValue) 796int maxTokenCount = int.MaxValue)
Model\EnglishRobertaTokenizer.cs (3)
410private EncodeResults<int> EncodeToIds(string? text, ReadOnlySpan<char> textSpan, bool considerPreTokenization, bool considerNormalization, int maxTokenCount = int.MaxValue) 495private int CountTokens(string? text, ReadOnlySpan<char> textSpan, bool considerPreTokenization, bool considerNormalization, out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue) 989var (first, second) = pairs.ArgMin(pair => _mergeRanks.GetOrAdd(pair, int.MaxValue));
Model\SentencePieceBaseModel.cs (2)
120int maxTokenCount = int.MaxValue); 130int maxTokenCount = int.MaxValue);
Model\SentencePieceBpeModel.cs (8)
282out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue) 311out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue) 357private int EncodeToIdsWithAddedToken(ReadOnlySpan<char> text, bool addBeginOfSentence, bool addEndOfSentence, IList<int> accumulatedIds, out int charsConsumed, int maxTokens = int.MaxValue) 419private int EncodeToIds(ReadOnlySpan<char> text, bool addBeginOfSentence, bool addEndOfSentence, IList<int> accumulatedIds, out int charsConsumed, int maxTokens = int.MaxValue) 602int maxTokenCount = int.MaxValue) 635private int CountTokensWithSpecialTokens(ReadOnlySpan<char> text, bool addBeginOfSentence, bool addEndOfSentence, out int charsConsumed, int maxTokens = int.MaxValue) 693private int CountTokens(ReadOnlySpan<char> text, bool addBeginOfSentence, bool addEndOfSentence, out int charsConsumed, int maxTokens = int.MaxValue) 962private int CountTokensFromEnd(ReadOnlySpan<char> text, bool addBeginOfSentence, bool addEndOfSentence, out int textIndex, int maxTokens = int.MaxValue)
Model\SentencePieceTokenizer.cs (4)
247=> _model.CountTokens(text, ReadOnlySpan<char>.Empty, addBeginningOfSentence, addEndOfSentence, considerNormalization, out _, out _, int.MaxValue); 259=> _model.CountTokens(null, text, addBeginningOfSentence, addEndOfSentence, considerNormalization, out _, out _, int.MaxValue); 273public int CountTokens(string text, bool addBeginningOfSentence, bool addEndOfSentence, bool considerPreTokenization, bool considerNormalization, out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue) 288public int CountTokens(ReadOnlySpan<char> text, bool addBeginningOfSentence, bool addEndOfSentence, bool considerPreTokenization, bool considerNormalization, out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue)
Model\SentencePieceUnigramModel.cs (8)
559int maxTokenCount = int.MaxValue) 587char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2); 795bool needToTrackUnknown = ByteFallback || maxTokenCount != int.MaxValue; 842if (maxTokenCount == int.MaxValue) 948int maxTokenCount = int.MaxValue) 977char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2); 1144if ((!ByteFallback || !unknownEncountered) && (maxTokenCount == int.MaxValue || (tokenCount + ids.Length - idsIndex <= maxTokenCount))) 1244char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
Model\TiktokenTokenizer.cs (4)
418private int EncodeToIds(ReadOnlySpan<char> text, IList<int> accumulatedIds, out int charsConsumed, int maxTokenCount = int.MaxValue) 531private int CountTokens(string? text, ReadOnlySpan<char> textSpan, bool considerPreTokenization, bool considerNormalization, out string? normalizedText, out int charsConsumed, int maxTokenCount = int.MaxValue) 584private int CountTokens(ReadOnlySpan<char> text, out int charsConsumed, int maxTokens = int.MaxValue) 710private int CountTokensFromEnd(ReadOnlySpan<char> text, out int textIndex, int maxTokens = int.MaxValue)
Model\Word.cs (1)
21if (capacity > int.MaxValue)
Model\WordPieceTokenizer.cs (1)
446private int EncodeToIds(ReadOnlySpan<char> text, List<int>? accumulatedIds, out int charsConsumed, int maxTokenCount = int.MaxValue)
Tokenizer.cs (3)
232settings.MaxTokenCount = int.MaxValue; 398if (newSize > int.MaxValue) 401if (newSize > int.MaxValue)
Utils\BytePairEncoder.cs (5)
32byteIndicesAndRanks[i] = (i, int.MaxValue); 46return int.MaxValue; 52if (rank != int.MaxValue) 60var minRank = (Index: 0, Rank: int.MaxValue); 69if (minRank.Rank != int.MaxValue)
Utils\TokenizerExtensions.cs (1)
21return minValue < int.MaxValue ? minSource : default;
Microsoft.ML.Transforms (19)
Dracula\CountTableTransformer.cs (1)
616Host.Check((long)valueCount * _parent.Featurizer.NumFeatures < int.MaxValue, "Too large output size");
Expression\BuiltinFunctions.cs (7)
984return neg ? I4.MinValue : I4.MaxValue; 998return neg ? I4.MinValue : I4.MaxValue; 1005if ((b & 1) != 0 && (result *= u) > I4.MaxValue) 1006return neg ? I4.MinValue : I4.MaxValue; 1010if ((u *= u) > I4.MaxValue) 1011return neg ? I4.MinValue : I4.MaxValue; 1013Contracts.Assert(result <= I4.MaxValue);
Expression\LambdaBinder.cs (1)
1375int minBad = int.MaxValue;
Expression\Node.cs (1)
785if (!lng && (uu <= I4.MaxValue || uu <= uint.MaxValue && ilt.IsHex && !uns))
LearnerFeatureSelection.cs (2)
79ectx.CheckUserArg((NumSlotsToKeep ?? int.MaxValue) > 0, nameof(NumSlotsToKeep), "Must be positive"); 136tiedScoresToKeep = threshold > 0 ? int.MaxValue : 0;
MissingValueIndicatorTransform.cs (2)
139Host.Check(type.GetValueCount() < int.MaxValue / 2); 297ectx.Check(0 <= size && size < int.MaxValue / 2);
SvmLight\SvmLightLoader.cs (3)
572_host.Assert(_featureCount <= int.MaxValue); 694if (!parser(in values[i], out var val) || val > int.MaxValue) 705ch.Warning($"{missingCount} of {count + missingCount} detected keys were missing, unparsable or greater than {int.MaxValue}");
Text\NgramHashingTransformer.cs (1)
205invertHashMaxCount = int.MaxValue;
Text\WordBagTransform.cs (1)
501termLoaderArgs == null ? NgramExtractingEstimator.Defaults.MaximumNgramsCount : int.MaxValue,
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
78if (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)
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Logging\FileLogTraceListener.DefaultValues.vb (1)
12Private Const MAX_OPEN_ATTEMPTS As Integer = Integer.MaxValue
Microsoft.VisualBasic.Forms.Tests (1)
System\Windows\TestUtilities\TestData\EnumTestInvalidData.vb (1)
11Yield {New EnumValueAndThrowIndicatorData(Of T)(CType(CObj(Integer.MaxValue), T), True)}
MinimalValidationSample (2)
Program.cs (2)
14app.MapGet("/customers/{id}", ([Range(1, int.MaxValue)] int id) => 66[Range(1, int.MaxValue)]
MSBuild (3)
CommandLineSwitches.cs (1)
546_parameterizedSwitches[(int)parameterizedSwitch].parameters.AddRange(QuotingUtilities.SplitUnquoted(switchParameters, int.MaxValue, false /* discard empty parameters */, unquoteParameters, out emptyParameters, s_parameterSeparators));
QuotingUtilities.cs (1)
169return SplitUnquoted(input, int.MaxValue, false /* discard empty splits */, false /* don't unquote the split pieces */, out emptySplits, separator);
XMake.cs (1)
4348var 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)
593_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)
51if (length > (long)System.Int32.MaxValue) 53throw new ApplicationException(SR.Format(SR.ResourceTooBig, _sourcePath, System.Int32.MaxValue));
src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\Internal\Media\XamlSerializationHelper.cs (1)
432if ( !( scaledInteger <= Int32.MaxValue ) // equivalent to scaledInteger > MaxValue, but take care of NaN.
PresentationCore (43)
MS\Internal\FontCache\FontCacheUtil.cs (1)
43ArgumentOutOfRangeException.ThrowIfGreaterThan(length, int.MaxValue);
MS\Internal\FontFace\FontFamilyIdentifier.cs (1)
413return InternalGetHashCode(int.MaxValue);
MS\Internal\Generic\Span.cs (1)
427private const int MaxCch = int.MaxValue;
MS\Internal\Ink\InkSerializedFormat\Codec.cs (1)
83if ( Int32.MaxValue >= MathHelper.AbsNoThrow(llxfData) )
MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (2)
173Debug.Assert(nDataLen > 0 && nDataLen - 1 <= Int32.MaxValue); 177Debug.Assert(nDataLen <= Int32.MaxValue);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
1475maximum = Int32.MaxValue;
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (1)
323Int32.MaxValue == propertyInfo.Maximum &&
MS\Internal\IO\Packaging\NetStream.cs (1)
612if (block.Offset > (Int32.MaxValue - block.Length + 1))
MS\Internal\Media\XamlSerializationHelper.cs (1)
432if ( !( scaledInteger <= Int32.MaxValue ) // equivalent to scaledInteger > MaxValue, but take care of NaN.
MS\Internal\Shaping\OpenTypeCommon.cs (3)
689FirstChar = int.MaxValue; 690AfterLastChar = int.MaxValue; 752if (FirstChar == int.MaxValue)
MS\Internal\Shaping\OpenTypeLayout.cs (1)
131public const int InvalidOffset = int.MaxValue;
MS\Internal\Shaping\Substitution.cs (1)
262int firstLigaChar=int.MaxValue;
MS\Internal\Span.cs (1)
569_cch = int.MaxValue;
MS\Internal\TextFormatting\SimpleTextLine.cs (1)
106int widthLeft = (pap.Wrap && paragraphWidth > 0) ? paragraphWidth : int.MaxValue;
MS\Internal\TextFormatting\TextMetrics.cs (1)
196if(plsLineInfo->dvrMultiLineHeight == int.MaxValue)
System\Windows\Documents\DocumentPaginator.cs (1)
96GetPage(int.MaxValue);
System\Windows\GlobalEventManager.cs (2)
430/// <exception cref="InvalidOperationException">Thrown in case the index is bigger than <see cref="int.MaxValue"/>.</exception> 438if (newIndex >= int.MaxValue)
System\Windows\Ink\StrokeCollection.cs (2)
742indexes[x] = Int32.MaxValue; 774if ( indexes[y] != Int32.MaxValue )
System\Windows\Input\Stylus\Common\StylusPointPropertyInfoDefaults.cs (11)
14Int32.MaxValue, 24Int32.MaxValue, 34Int32.MaxValue, 44Int32.MaxValue, 54Int32.MaxValue, 74Int32.MaxValue, 85Int32.MaxValue, 175Int32.MaxValue, 185Int32.MaxValue, 195Int32.MaxValue, 235Int32.MaxValue,
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
753sinceBeginning = (Int32.MaxValue - _cachedMoveStartTimestamp) + timestamp;
System\Windows\Media\Animation\RepeatBehavior.cs (1)
226return int.MaxValue - 42;
System\Windows\Media\CharacterMetricsDictionary.cs (2)
431unicodeScalar = int.MaxValue; 539if (_unicodeScalar < int.MaxValue)
System\Windows\Media\FormattedText.cs (1)
1992private int _maxLineCount = int.MaxValue;
System\Windows\Media\Generated\RenderData.cs (1)
525Debug.Assert(cbExtraData <= (uint)Int32.MaxValue);
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
282Invariant.Assert(lockBufferStride <= Int32.MaxValue);
System\Windows\Media\PathGeometry.cs (1)
238Debug.Assert(pSegmentPoly->Count <= Int32.MaxValue);
System\Windows\Media\RenderData.cs (1)
497Debug.Assert(index <= (uint)Int32.MaxValue);
PresentationFramework (69)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
360startOffset = Int32.MaxValue;
MS\Internal\AppModel\IconHelper.cs (1)
438int bestScore = int.MaxValue;
MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (1)
137protected const long MaxBufferSize = (Int32.MaxValue / 4) * 3;
MS\Internal\Documents\DocumentGridPage.cs (2)
284PageNumber = int.MaxValue 311e.PageNumber != int.MaxValue &&
MS\Internal\Documents\TextDocumentView.cs (2)
2797cpcCur = tableResult.GetCellAbove(suggestedX, int.MaxValue, int.MaxValue);
MS\Internal\PtsHost\BreakRecordTable.cs (2)
164_owner.OnPagesChanged(0, int.MaxValue/2); 197_owner.OnPagesChanged(pageStart, int.MaxValue/2);
MS\Internal\PtsHost\ListMarkerSourceInfo.cs (2)
92if (int.MaxValue - size < startIndex) 95highestIndex = int.MaxValue;
MS\Internal\PtsHost\ListParaClient.cs (2)
100if (int.MaxValue - index < indexFirstParaInSubtrack) 102adjustedIndex = int.MaxValue;
MS\Internal\PtsHost\TableParaClient.cs (3)
611int iClosestDistance = int.MaxValue; 969int iClosestDistance = int.MaxValue; 1048int iClosestDistance = int.MaxValue;
MS\Internal\PtsHost\TextParagraph.cs (1)
150fstxtprops.cMaxConsecutiveHyphens = int.MaxValue;
MS\Internal\PtsTable\RowSpanVector.cs (3)
46_entries[0].Start = int.MaxValue / 2; 47_entries[0].Range = int.MaxValue / 2; 48_entries[0].Ttl = int.MaxValue;
MS\Internal\Utility\TraceLog.cs (1)
24internal TraceLog() : this(Int32.MaxValue) {}
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (3)
72if (((uint)int.MaxValue) < size) 117private static void EnsureIndexInt32(uint index, int limit = int.MaxValue) 121if (((uint)int.MaxValue) <= index || index >= (uint)limit)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\ItemMap.cs (1)
65int keyPv = Int32.MaxValue;
System\Windows\Annotations\AnnotationService.cs (2)
727AdornerPresentationContext.SetZLevelRange(0, Int32.MaxValue / 2 + 1, Int32.MaxValue);
System\Windows\Automation\Peers\DocumentPageViewAutomationPeer.cs (1)
56else if ((owner.PageNumber >= 0) && (owner.PageNumber < int.MaxValue))
System\Windows\Controls\Grid.cs (4)
873extData.CellGroup1 = int.MaxValue; 874extData.CellGroup2 = int.MaxValue; 875extData.CellGroup3 = int.MaxValue; 876extData.CellGroup4 = int.MaxValue;
System\Windows\Controls\ItemContainerGenerator.cs (1)
2857public virtual int ContainerCount { get { return Int32.MaxValue; } }
System\Windows\Controls\Primitives\DocumentPageView.cs (1)
754(e.Count == int.MaxValue || this.PageNumber <= e.Start + e.Count))
System\Windows\Controls\TextBox.cs (4)
634Int32.MaxValue, 642[DefaultValue(Int32.MaxValue)] 1823if (MaxLines < Int32.MaxValue && this.ScrollViewer.MaxHeight != value) 1859if (MaxLines < Int32.MaxValue && RenderScope.MaxHeight != value)
System\Windows\Controls\TextRangeAdaptor.cs (1)
992int absCount = (count == int.MinValue) ? int.MaxValue : Math.Abs(count);
System\Windows\Controls\ToolTipService.cs (1)
364new FrameworkPropertyMetadata(Int32.MaxValue), // Default Value
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
788left = int.MaxValue; 789top = int.MaxValue;
System\Windows\Controls\VirtualizingStackPanel.cs (4)
2206int firstItemInViewportIndex = Int32.MinValue, lastItemInViewportIndex = Int32.MaxValue, firstItemInViewportChildIndex = Int32.MinValue, firstItemInExtendedViewportIndex = Int32.MinValue; 4010CleanupContainers(Int32.MaxValue, Int32.MaxValue, itemsControl); 12018_luThreshold = (luThreshold <= 0) ? int.MaxValue : luThreshold;
System\Windows\Documents\AdornerLayer.cs (1)
1009private const int DefaultZOrder = System.Int32.MaxValue;
System\windows\Documents\CaretElement.cs (3)
1114else if (value > Int32.MaxValue) 1116i = Int32.MaxValue; 1283internal const int ZOrderValue = System.Int32.MaxValue / 2;
System\Windows\Documents\DocumentSequence.cs (1)
829_paginator.NotifyPagesChanged(new PagesChangedEventArgs(PageCount, int.MaxValue));
System\Windows\Documents\FixedFlowMap.cs (2)
91internal const int FixedOrderEndPage = int.MaxValue; 93internal const int FixedOrderEndVisual = int.MaxValue;
System\Windows\Documents\FixedPage.cs (2)
581int zOrder = System.Int32.MaxValue / 2; 591al.Add(new DebugVisualAdorner(this), System.Int32.MaxValue / 4);
System\Windows\Documents\FixedTextBuilder.cs (1)
482int stopAt = Int32.MaxValue;
System\Windows\Documents\FixedTextContainer.cs (2)
330int pageNumber = int.MaxValue; 571_containerElement = new FixedElement(FixedElement.ElementType.Container, _start, _end, int.MaxValue);
System\Windows\Documents\ImmComposition.cs (2)
1820else if (value > Int32.MaxValue) 1822i = Int32.MaxValue;
System\Windows\Documents\List.cs (1)
202if (itemIndex < int.MaxValue)
System\Windows\Documents\Speller.cs (1)
1238leftWordBreak = Int32.MaxValue;
System\Windows\Input\KeyboardNavigation.cs (4)
182new FrameworkPropertyMetadata(Int32.MaxValue)); 2153int maxIndexFirstTab = Int32.MaxValue; 2195int maxIndexFirstTab = Int32.MaxValue; 2196int maxIndex = Int32.MaxValue;
System\Windows\Standard\Utilities.cs (1)
135int bestScore = int.MaxValue;
System\Windows\Window.cs (2)
5684((l > Int32.MaxValue) || (l < Int32.MinValue))) 5700if ((length > Int32.MaxValue) ||
ReachFramework (7)
AlphaFlattener\BrushProxy.cs (3)
4247_right = Int32.MaxValue; 4499else if (v > System.Int32.MaxValue) 4501return System.Int32.MaxValue;
AlphaFlattener\Optimizer.cs (1)
35m_lowestPrimitive = int.MaxValue;
MS\Internal\Printing\MostFrequentlyUsedCache.cs (1)
59int minUseCount = int.MaxValue;
PrintConfig\PTProvider.cs (2)
816return (int)Math.Max(0, Math.Min(value, int.MaxValue)); 821return (int)Math.Min(value, int.MaxValue);
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Shared.Tests (5)
Data.Validation\TimeSpanAttributeTests.cs (3)
72options.Time2 = TimeSpan.FromMilliseconds(int.MaxValue); 135options.Time2 = TimeSpan.FromMilliseconds(int.MaxValue); 200options.Time2 = TimeSpan.FromMilliseconds(int.MaxValue);
JsonSchemaExporter\TestTypes.cs (2)
421IntEnum = (IntEnum)int.MaxValue, 425StringEnumUsingIntConverter = (StringEnum)int.MaxValue,
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
67[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)
814Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 829Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 844Debug.Assert(index < int.MaxValue, "This method should only be called when there's no overflow risk"); 2003_budget = int.MaxValue; 2020_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)
214int minLength = int.MaxValue, maxLength = 0;
System\Collections\Frozen\FrozenSet.cs (1)
146int 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.Configuration.ConfigurationManager (5)
System\Configuration\InfiniteIntConverter.cs (2)
16return (int)value == int.MaxValue ? "Infinite" : ((int)value).ToString(CultureInfo.InvariantCulture); 23return (string)data == "Infinite" ? int.MaxValue : Convert.ToInt32((string)data, 10);
System\Configuration\IntegerValidatorAttribute.cs (1)
9private int _max = int.MaxValue;
System\Configuration\StringValidator.cs (1)
13: this(minLength, int.MaxValue, null)
System\Configuration\StringValidatorAttribute.cs (1)
9private int _maxLength = int.MaxValue;
System.Console (1)
System\TerminalFormatStrings.cs (1)
164MinKeyFormatLength = 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.Data.Odbc (2)
System\Data\Odbc\OdbcDataReader.cs (2)
1132if (int.MaxValue < dataIndex) 2277row[columnSize] = unchecked((int)Math.Min(Math.Max(int.MinValue, _metadata![i].size.ToInt64()), int.MaxValue));
System.Diagnostics.Process (4)
System\Diagnostics\Process.cs (2)
821return WaitForInputIdle(int.MaxValue); 1452ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\Diagnostics\Process.Linux.cs (2)
231if (rsslim > int.MaxValue) 232rsslim = int.MaxValue;
System.Drawing.Common.Tests (98)
mono\System.Drawing\GraphicsTests.cs (28)
1624SizeF sizeP = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MaxValue) : g.MeasureString(s, _font, int.MaxValue); 1657? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1658: g.MeasureString(text, _font, int.MaxValue, string_format); 1662? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1663: g.MeasureString(text, _font, int.MaxValue, string_format); 1667? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1668: g.MeasureString(text, _font, int.MaxValue, string_format); 1690? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1691: g.MeasureString(text, _font, int.MaxValue, string_format); 1695? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1696: g.MeasureString(text, _font, int.MaxValue, string_format); 1700? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1701: g.MeasureString(text, _font, int.MaxValue, string_format); 1721? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1722: g.MeasureString(text, _font, int.MaxValue, string_format); 1726? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1727: g.MeasureString(text, _font, int.MaxValue, string_format); 1731? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1732: g.MeasureString(text, _font, int.MaxValue, string_format); 1754? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1755: g.MeasureString(text, _font, int.MaxValue, string_format); 1759? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1760: g.MeasureString(text, _font, int.MaxValue, string_format); 1764? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format) 1765: g.MeasureString(text, _font, int.MaxValue, string_format); 2543Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, int.MaxValue, int.MinValue)); 2551Assert.Throws<OverflowException>(() => g.DrawImage(bmp, int.MaxValue, int.MinValue));
System\Drawing\BitmapTests.cs (3)
198yield return new object[] { 5, 15, int.MaxValue, PixelFormat.Format32bppArgb, IntPtr.Zero }; 218[InlineData(int.MaxValue)] 233[InlineData(int.MaxValue)]
System\Drawing\ColorTranslatorTests.cs (1)
66yield return new object[] { int.MaxValue, Color.White };
System\Drawing\Drawing2D\BlendTests.cs (1)
35Assert.Throws<OutOfMemoryException>(() => new Blend(int.MaxValue));
System\Drawing\Drawing2D\ColorBlendTests.cs (1)
35Assert.Throws<OutOfMemoryException>(() => new ColorBlend(int.MaxValue));
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (1)
330yield return new object[] { new PointF[3], new byte[3], 0, int.MaxValue };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
88new PathGradientBrush(_defaultIntPoints, (WrapMode)int.MaxValue)); 91new PathGradientBrush(_defaultFloatPoints, (WrapMode)int.MaxValue));
System\Drawing\FontFamilyTests.cs (1)
216[InlineData(int.MaxValue, "Code New Roman")]
System\Drawing\FontTests.cs (5)
97yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue }; 179yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter }; 221yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter, 200 }; 263yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter, 200, false }; 565[InlineData(FontStyle.Strikeout | FontStyle.Underline | FontStyle.Bold | FontStyle.Italic, int.MaxValue, 1)]
System\Drawing\GraphicsTests.cs (8)
1527yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) }; 1528yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) }; 1530yield return new object[] { 0, 0, int.MaxValue, int.MaxValue, new Size(1, 1) }; 1550[InlineData(0, 0, 0, 0, int.MaxValue, int.MaxValue)]
System\Drawing\IconTests.cs (2)
63yield return new object[] { "256x256_one_entry_32bit.ico", new Size(int.MaxValue, int.MaxValue), new Size(256, 256) };
System\Drawing\Imaging\BitmapDataTests.cs (5)
21[InlineData(int.MaxValue)] 34[InlineData(int.MaxValue)] 47[InlineData(int.MaxValue)] 60[InlineData(int.MaxValue)] 73[InlineData(int.MaxValue)]
System\Drawing\Imaging\EncoderParameterTests.cs (7)
76[InlineData(int.MaxValue, int.MaxValue)] 303[InlineData(EncoderParameterValueType.ValueTypeShort, (int.MaxValue / 2) + 1, typeof(OverflowException))] 304[InlineData(EncoderParameterValueType.ValueTypeLong, (int.MaxValue / 4) + 1, typeof(OverflowException))] 305[InlineData(EncoderParameterValueType.ValueTypeRational, (int.MaxValue / 8) + 1, typeof(OverflowException))] 306[InlineData(EncoderParameterValueType.ValueTypeLongRange, (int.MaxValue / 8) + 1, typeof(OverflowException))] 307[InlineData(EncoderParameterValueType.ValueTypeRationalRange, (int.MaxValue / 16) + 1, typeof(OverflowException))]
System\Drawing\Imaging\ImageAttributesTests.cs (3)
258yield return new object[] { (ColorMatrixFlag)int.MaxValue }; 470[InlineData((ColorMatrixFlag)int.MaxValue)] 994yield return new object[] { (ColorChannelFlag)int.MaxValue };
System\Drawing\Imaging\MetafileTests.cs (4)
136yield return new object[] { (EmfType)int.MaxValue }; 296yield return new object[] { (MetafileFrameUnit)int.MaxValue }; 964GraphicsUnit graphicsUnit = (GraphicsUnit)int.MaxValue; 984GraphicsUnit graphicsUnit = (GraphicsUnit)int.MaxValue;
System\Drawing\Imaging\MetaHeaderTests.cs (1)
44[InlineData(int.MaxValue)]
System\Drawing\Imaging\PropertyItemTests.cs (2)
65yield return new object[] { int.MaxValue, int.MaxValue, short.MaxValue, new byte[1] { 0 } };
System\Drawing\Imaging\WmfPlaceableFileHeaderTests.cs (1)
53[InlineData(int.MaxValue)]
System\Drawing\PenTests.cs (3)
1002[InlineData((LineCap)int.MaxValue, (LineCap)int.MaxValue, (DashCap)int.MaxValue)]
System\Drawing\Printing\MarginsTests.cs (5)
43[InlineData(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue)] 156yield return new object[] { int.MaxValue };
System\Drawing\Printing\PaperSizeTests.cs (3)
64yield return new object[] { int.MaxValue }; 102yield return new object[] { int.MaxValue }; 161[InlineData(int.MaxValue, PaperKind.Custom)]
System\Drawing\Printing\PaperSourceTests.cs (1)
57[InlineData(int.MaxValue, PaperSourceKind.Custom)]
System\Drawing\Printing\PrinterResolutionTests.cs (2)
20[InlineData(int.MaxValue)] 39[InlineData(int.MaxValue)]
System\Drawing\Printing\PrinterSettingsTests.cs (6)
120[InlineData((Duplex)int.MaxValue)] 138[InlineData(int.MaxValue)] 214[InlineData(int.MaxValue)] 243[InlineData(int.MaxValue)] 321[InlineData((PrintRange)int.MaxValue)] 425[InlineData(int.MaxValue)]
System\Drawing\StringFormatTests.cs (2)
128[InlineData(int.MaxValue, StringDigitSubstitute.Traditional + 1, 65535)] 287[InlineData((StringFormatFlags)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">Int32.MinValue</see> and <see cref="int.MaxValue">Int32.MaxValue</see>, inclusive; otherwise, 603/// <see cref="int.MinValue">Int32.MinValue</see> and <see cref="int.MaxValue">Int32.MaxValue</see>, 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)
901if (_compressedSize > int.MaxValue)
System.IO.Compression.Brotli (3)
System\IO\Compression\enc\BrotliEncoder.cs (3)
106/// <param name="inputSize">The input size to get the maximum expected compressed length from. Must be greater than or equal to 0 and small enough that the result is less than or equal to <see cref="int.MaxValue"/>.</param> 109/// <exception cref="System.ArgumentOutOfRangeException"><paramref name="inputSize" /> is less than 0, the minimum allowed input size, or large enough that the result would be larger than <see cref="int.MaxValue"/>.</exception> 115if (result > int.MaxValue)
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.IO.Ports (1)
System\IO\Ports\SerialPort.cs (1)
1345return (elapsedTime >= 0) ? (int)elapsedTime : 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)
195return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 258Debug.Assert((uint)(end - start) <= (uint)int.MaxValue); 444return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 562return 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)
234Debug.Assert(maxIndexInclusive == -1 || (maxIndexInclusive - minIndexInclusive < int.MaxValue), $"{nameof(Limit)} will overflow!"); 287Debug.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.AsyncEnumerable (7)
System\Linq\CountAsync.cs (3)
19/// <exception cref="OverflowException">The number of elements in source is larger than <see cref="int.MaxValue"/> (via the returned task).</exception> 51/// <exception cref="OverflowException">The number of elements that satisfy the condition is larger than <see cref="int.MaxValue"/> (via the returned task).</exception> 86/// <exception cref="OverflowException">The number of elements that satisfy the condition is larger than <see cref="int.MaxValue"/> (via the returned task).</exception>
System\Linq\Range.cs (2)
15/// <exception cref="ArgumentOutOfRangeException"><paramref name="start"/> + <paramref name="count"/> -1 is larger than <see cref="int.MaxValue"/>.</exception> 23if (count < 0 || (((long)start) + count - 1) > int.MaxValue)
System\Linq\SumAsync.cs (2)
18/// <exception cref="OverflowException">The sum is larger than <see cref="int.MaxValue"/>.</exception> 145/// <exception cref="OverflowException">The sum is larger than <see cref="int.MaxValue"/>.</exception>
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)
281if (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)
103int.MaxValue); 108value = int.MaxValue;
System\Net\Http\Headers\AltSvcHeaderParser.cs (1)
438if (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)
149_maxHttp11Connections = int.MaxValue;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (2)
200ReadFromConnectionBuffer(int.MaxValue); 232ReadFromConnectionBuffer(int.MaxValue);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (4)
77private const int MaxStreamId = int.MaxValue; 177return (long)(milliseconds > int.MaxValue ? int.MaxValue : milliseconds); 910ChangeMaxConcurrentStreams(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)
146public 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)
118Debug.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 (4)
src\libraries\Common\src\System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs (1)
41Debug.Assert(bufferSize <= int.MaxValue - 1);
System\Net\CookieContainer.cs (3)
99if (perDomainCapacity != int.MaxValue && (perDomainCapacity <= 0 || perDomainCapacity > capacity)) 117if (value <= 0 || (value < m_maxCookiesPerDomain && m_maxCookiesPerDomain != int.MaxValue)) 166if (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 768if (frameSize == int.MaxValue && _buffer.EncryptedLength > TlsFrameHelper.HeaderSize)
System.Net.Sockets (6)
System\Net\Sockets\NetworkStream.cs (2)
369/// <exception cref="ArgumentOutOfRangeException"><paramref name="timeout"/> is less than -1 milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.</exception> 383ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\Net\Sockets\Socket.cs (2)
1004public void Listen() => Listen(int.MaxValue); 2443ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMicroseconds, int.MaxValue, nameof(timeout));
System\Net\Sockets\SocketPal.Unix.cs (2)
393int available = int.MaxValue; 406available = int.MaxValue;
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
837if (contentLength > int.MaxValue) 884if (contentLength > int.MaxValue)
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
151static int TimeSpanToMs(TimeSpan value) => (int)Math.Clamp((long)value.TotalMilliseconds, MinIntervalMs, int.MaxValue);
System.Numerics.Tensors (6)
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.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
41threshold = dictionaryCreationThreshold == -1 ? int.MaxValue : dictionaryCreationThreshold;
System.Private.CoreLib (183)
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">int.MaxValue</see>.</exception>
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
192ArgumentOutOfRangeException.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)
812ArgumentOutOfRangeException.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\Base64Helper\Base64DecoderHelper.cs (1)
112Debug.Assert(destLength < (int.MaxValue / 4 * 3));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (1)
671internal 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) 3083ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 3102else if (source.Length > int.MaxValue / 2 || destination.Length < source.Length * 2) 3160ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 3179else if (source.Length > int.MaxValue / 2 || destination.Length < source.Length * 2)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1760int actualResult = (value >= int.MaxValue) ? int.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
2331if (tmp64 > int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (2)
289int sleepDurationInMilliseconds = int.MaxValue; 328if (sleepDurationInMilliseconds == int.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
125if ((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)
1535return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (18)
629static int IMinMaxValue<int>.MaxValue => MaxValue; 1005result = (actualValue >= MaxValue) ? MaxValue : 1012result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1025result = (actualValue >= MaxValue) ? MaxValue : 1032result = (actualValue >= MaxValue) ? MaxValue : 1039result = (actualValue >= MaxValue) ? MaxValue : 1052result = (actualValue >= MaxValue) ? MaxValue : 1083result = (actualValue >= MaxValue) ? MaxValue : 1090result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1127result = (actualValue >= MaxValue) ? MaxValue : 1443static int IBinaryIntegerParseAndFormatInfo<int>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\IO\EnumerationOptions.cs (2)
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>
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)
863/// <exception cref="ArgumentOutOfRangeException">The number of characters in the next line is larger than <see cref="int.MaxValue"/>.</exception> 995/// <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)
904return int.MaxValue; 1672private 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.CompatImpl.cs (10)
42return range <= int.MaxValue ? 162return range <= int.MaxValue ? 279int subtraction = (seed == int.MinValue) ? int.MaxValue : Math.Abs(seed); 297mk += int.MaxValue; 316seedArray[i] += int.MaxValue; 328InternalSample() * (1.0 / int.MaxValue); 357if (retVal == int.MaxValue) 363retVal += int.MaxValue; 386d += int.MaxValue - 1; // get a number in range [0..2*int.MaxValue-1) 387d /= 2u * int.MaxValue - 1;
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); 489AssertInRange(result, 0, int.MaxValue);
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)
611int hashCode = RuntimeHelpers.GetHashCode(key) & int.MaxValue; 655hashCode &= int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
643int arraySize = (int)Math.Clamp(newCapacity, MinimumArrayPoolLength, int.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
250/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception> 260/// <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)
1700int 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; 453minLength = 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)
235if (totalLength > int.MaxValue) 273if (totalLength > int.MaxValue) 418if (totalLengthLong > int.MaxValue) 1045if (totalSeparatorsLength > int.MaxValue) 1416if (dstLength > int.MaxValue) 1638return SplitInternal(new ReadOnlySpan<char>(in separator), int.MaxValue, options); 1657return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1667return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1688return SplitInternal(separator, int.MaxValue, options); 1740return SplitInternal(separator ?? Empty, null, int.MaxValue, options); 1750return 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; 957Debug.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)
395/// than <see cref="int.MaxValue"/>.</exception> 407ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout)); 426/// than <see cref="int.MaxValue"/>.</exception> 440ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
43t_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; 215/// than <see cref="int.MaxValue"/>.</exception> 224if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 248/// than <see cref="int.MaxValue"/>.</exception> 258if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 561/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 585/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 591if (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)
238_count = (_count == int.MaxValue ? YieldThreshold : _count + 1); 282/// <see cref="int.MaxValue"/>.</exception> 287if (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)
2651/// <see cref="int.MaxValue"/>. 2672/// <see cref="int.MaxValue"/>. 2680if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 4766/// <see cref="int.MaxValue"/>. 4776if (totalMilliseconds is < -1 or > int.MaxValue) 5211/// <see cref="int.MaxValue"/>. 5217if (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)
555return int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (10)
107private const int START_INDEX = int.MaxValue; 122if (tail == int.MaxValue) 179if (tail == int.MaxValue) 482int minCount = int.MaxValue; 1691if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1711if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1764ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1783ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1804ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, int.MaxValue, nameof(timeout)); 1826ArgumentOutOfRangeException.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)
96shortestWaitDurationMs = int.MaxValue; 133if (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)
1876int 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)
1049int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1048int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1051int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
313/// <exception cref="OverflowException">At least one component in <paramref name="utf8Text" /> represents a number that is greater than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
442/// this instance exceed <see cref="int.MaxValue"/>.</exception>
src\System\GC.CoreCLR.cs (2)
137ArgumentOutOfRangeException.ThrowIfGreaterThan(bytesAllocated, int.MaxValue); 148ArgumentOutOfRangeException.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.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\Deserializer.cs (1)
20/// than <see cref="int.MaxValue"/> elements.
System.Private.Windows.Core.Tests (5)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (4)
58new Point(-1, int.MaxValue), 60new Size(int.MaxValue, int.MinValue), 73new List<int> { int.MinValue, int.MaxValue }, 93new int[] { int.MinValue, int.MaxValue },
System\Value\StoringInt.cs (1)
12{ int.MaxValue },
System.Private.Windows.Core.TestUtilities (1)
CommonTestHelper.cs (1)
88data.Add(new Point(int.MaxValue, int.MinValue));
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)
434int leastDerivedLevel = int.MaxValue;
System\Xml\Serialization\XmlReflectionImporter.cs (1)
2395_maxDepth = DiagnosticsSwitches.NonRecursiveTypeLoading.Enabled ? 1 : int.MaxValue;
System\Xml\Serialization\XmlSerializationWriter.cs (1)
588if (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\StreamExtensions.cs (1)
92if (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\TypeName.cs (1)
442/// this instance exceed <see cref="int.MaxValue"/>.</exception>
System\Reflection\Metadata\TypeSystem\FieldDefinition.cs (1)
122if (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 (4)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
587if (ms.Length > int.MaxValue) 597if (s.Length > int.MaxValue)
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (1)
23/// than <see cref="int.MaxValue"/> elements.
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
227if (stream.Length > int.MaxValue)
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
587if (ms.Length > int.MaxValue) 597if (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)
142_configPollingInterval = (milliseconds < (double)int.MaxValue) ? (int)milliseconds : int.MaxValue; 154_configCacheMemoryLimitMegabytes = ConfigUtil.GetIntValue(config, ConfigUtil.CacheMemoryLimitMegabytes, _configCacheMemoryLimitMegabytes, true, int.MaxValue); 360int 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 (20)
src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
194exp = int.MaxValue;
System\Number.BigInteger.cs (2)
310if (number.Scale == int.MaxValue) 791Debug.Assert((long)BigInteger.MaxLength * (MaxPartialDigits + 1) / MaxPartialDigits + 1 < (long)int.MaxValue); // won't overflow
System\Numerics\BigInteger.cs (12)
67if (value <= int.MaxValue) 83if (int.MinValue < value && value <= int.MaxValue) 125if (value <= int.MaxValue) 2178if ((int.MinValue < value) && (value <= int.MaxValue)) 2280if (value <= (uint)int.MaxValue) 2500return ((value >> int.MaxValue) >> 1); 2559return ((value << int.MaxValue) << 1); 3271return RotateRight(RotateRight(value, int.MaxValue), 1); 3426return RotateLeft(RotateLeft(value, int.MaxValue), 1); 4736actualResult = IsNegative(value) ? int.MinValue : int.MaxValue; 4740actualResult = (value._sign >= int.MaxValue) ? int.MaxValue :
System\Numerics\Complex.cs (4)
1866int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue : 2002int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue :
System\Numerics\NumericsHelpers.cs (1)
32exp = int.MaxValue;
System.Runtime.Serialization.Formatters (5)
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\ObjectManager.cs (3)
1431newLength = int.MaxValue; 1515newLength = int.MaxValue; 1558newLength = int.MaxValue;
System.Runtime.Serialization.Schema (2)
System\Runtime\Serialization\Schema\CodeExporter.cs (2)
440if (i == int.MaxValue) 1602if (i == int.MaxValue)
System.Security.Cryptography (20)
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
42int length = (int)Math.Min(int.MaxValue, fileStream.Length);
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
60CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
System\Security\Cryptography\AesImplementation.cs (1)
259if (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 (7)
362/// The length of the PEM-encoded value is larger than <see cref="int.MaxValue"/>. 410if (int.MaxValue - encodedDataLengthWithBreaks < totalEncapLength) 452/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 510/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 568/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 653/// The resulting PEM-encoded text is larger than <see cref="int.MaxValue"/>. 696/// 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 (4)
96if (bitLength > int.MaxValue || !ValidKeySize((int)bitLength)) 230if (bitLength > int.MaxValue || !ValidKeySize((int)bitLength)) 385if (int.MaxValue - wholeBlocks < blockSizeBytes) 464if (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\X509Certificate.LegacyLimits.cs (1)
43limits.TotalKdfIterationLimit = (int)long.Min(int.MaxValue, totalKdfLimit);
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (1)
547/// The combined size of encoding all certificates exceeds <see cref="int.MaxValue" />.
System.ServiceModel.Federation (2)
System\Runtime\TaskHelpers.cs (1)
159private static readonly TimeSpan s_maxWait = TimeSpan.FromMilliseconds(int.MaxValue);
System\Runtime\TimeoutHelper.cs (1)
11public static readonly TimeSpan MaxWait = TimeSpan.FromMilliseconds(int.MaxValue);
System.ServiceModel.Http.Tests (6)
ServiceModel\BasicHttpBindingTest.cs (3)
105[InlineData(int.MaxValue)] 124[InlineData(int.MaxValue)] 144[InlineData(int.MaxValue)]
ServiceModel\BasicHttpsBindingTest.cs (3)
95[InlineData(int.MaxValue)] 114[InlineData(int.MaxValue)] 134[InlineData(int.MaxValue)]
System.ServiceModel.NetFramingBase (11)
System\ServiceModel\Channels\Connection.cs (2)
128SR.Format(SR.ValueMustBeInRange, -1, int.MaxValue))); 143SR.Format(SR.ValueMustBeInRange, -1, int.MaxValue)));
System\ServiceModel\Channels\ConnectionOrientedTransportBindingElement.cs (2)
61if (maxReceivedMessageSize > int.MaxValue) 63return int.MaxValue;
System\ServiceModel\Channels\FramingChannels.cs (1)
84int.MaxValue, BufferManager, SessionEncoder.MaxMessageFrameSize);
System\ServiceModel\Channels\NetFramingTransportChannelFactory.cs (1)
56if (bindingElement.TransferMode == TransferMode.Buffered && bindingElement.MaxReceivedMessageSize > int.MaxValue)
System\ServiceModel\Channels\SingletonConnectionReader.cs (3)
375if (int.MaxValue - _chunkBytesRemaining >= IntEncoder.MaxEncodedSize) 479if (int.MaxValue - _chunkBytesRemaining >= IntEncoder.MaxEncodedSize) 591int.MaxValue, settings.BufferManager, envelopeStartBytes.Length + IntEncoder.MaxEncodedSize);
System\ServiceModel\Channels\TransportChannelFactory.cs (2)
134if (MaxReceivedMessageSize > int.MaxValue) 136return int.MaxValue;
System.ServiceModel.NetTcp.Tests (1)
ServiceModel\NetTcpBindingTest.cs (1)
54[InlineData(int.MaxValue)]
System.ServiceModel.Primitives.Tests (9)
Channels\BinaryMessageEncodingBindingElementTest.cs (3)
44[InlineData(int.MaxValue)] 95[InlineData(int.MaxValue)] 122[InlineData(int.MaxValue)]
Channels\MessageTest.cs (2)
95var msgFault = MessageFault.CreateFault(message, int.MaxValue); 105msgFault = MessageFault.CreateFault(message, int.MaxValue);
Security\securityKeyTest.cs (2)
17Assert.Equal(int.MaxValue, msk.KeySize); 36return int.MaxValue;
ServiceModel\MessageContractTest.4.4.0.cs (2)
180MessageBuffer buffer = msg.CreateBufferedCopy(Int32.MaxValue); 261MessageBuffer buffer = msg.CreateBufferedCopy(Int32.MaxValue);
System.ServiceModel.Syndication (13)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (2)
47_maxExtensionSize = int.MaxValue; 54_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
35_maxExtensionSize = int.MaxValue; 42_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (2)
34_maxExtensionSize = int.MaxValue; 40_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
41_maxExtensionSize = int.MaxValue; 54_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\SyndicationElementExtension.cs (2)
29_buffer = new XmlBuffer(int.MaxValue); 183_buffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (1)
186XmlBuffer newBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Syndication\XmlSyndicationContent.cs (2)
44_contentBuffer = new XmlBuffer(int.MaxValue); 164XmlBuffer tmp = new XmlBuffer(int.MaxValue);
System.ServiceModel.UnixDomainSocket.Tests (1)
ServiceModel\UnixDomainSocketBindingTest.cs (1)
55[InlineData(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 (153)
System\Text\Json\BitStack.cs (2)
83Debug.Assert(_array.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {_array.Length}"); 165Debug.Assert(_array.Length < int.MaxValue / 2, $"Array too large - arrayLength: {_array.Length}");
System\Text\Json\Document\JsonDocument.cs (3)
965Debug.Assert(reader.TokenStartIndex <= int.MaxValue); 1052Debug.Assert(tokenStart < int.MaxValue); 1077Debug.Assert(tokenStart < int.MaxValue);
System\Text\Json\Document\JsonDocument.DbRow.cs (1)
37internal 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)
136byte[] newBuffer = ArrayPool<byte>.Shared.Rent((_buffer.Length < (int.MaxValue / 2)) ? _buffer.Length * 2 : int.MaxValue);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
814Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 963Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (6)
136Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 159Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 210Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - encodedLength - 6); 245Debug.Assert(escapedPropertyName.Length < int.MaxValue - encodedLength - 6); 284Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - encodedLength - 7 - _newLineLength); 334Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - encodedLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (6)
143Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 166Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 215Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 249Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 286Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength); 335Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (6)
142Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 165Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 214Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 248Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6); 285Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength); 334Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (6)
142Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 165Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 214Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDecimalLength - 4); 245Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDecimalLength - 4); 279Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength); 325Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.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.MaximumFormatDoubleLength - 4); 249Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDoubleLength - 4); 283Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength); 329Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.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.MaximumFormatSingleLength - 4); 249Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatSingleLength - 4); 283Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatSingleLength - 5 - _newLineLength); 329Debug.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)
142Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 165Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 214Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatGuidLength - 6); 249Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatGuidLength - 6); 287Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength); 337Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (4)
77Debug.Assert(escapedPropertyName.Length < int.MaxValue - 5); 108Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 6 - _newLineLength); 149Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 5); 180Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 6 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (7)
261Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 284Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 334Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - value.Length - 4); 365Debug.Assert(escapedPropertyName.Length < int.MaxValue - value.Length - 4); 398Debug.Assert(escapedPropertyNameSection.Length < int.MaxValue - value.Length - 1); 427Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - value.Length - 5 - _newLineLength); 473Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - value.Length - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (6)
215Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 238Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 287Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatInt64Length - 4); 318Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatInt64Length - 4); 352Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength); 398Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (41)
95Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 112Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 159Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 4) / JsonConstants.MaxExpansionFactorWhileTranscoding); 190Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 5 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding); 244Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 271Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 320Debug.Assert(escapedPropertyName.Length < int.MaxValue - 4); 350Debug.Assert(escapedPropertyNameSection.Length < int.MaxValue - 4); 378Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 5 - _newLineLength); 601Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 688Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 775Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 847Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 896Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 919Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 942Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 965Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 991Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 992Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 1010Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 1011Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 1029Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); 1030Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); 1048Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); 1049Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); 1064Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 1065Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 1124Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 1125Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1184Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 1185Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 1244Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 1245Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1358Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 6) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length); 1393Debug.Assert(escapedPropertyName.Length < int.MaxValue - escapedValue.Length - 6); 1429Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6); 1465Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6); 1504Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 7 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length); 1554Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - escapedValue.Length - 7 - _newLineLength); 1605Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength); 1656Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (6)
224Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); 247Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 296Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatUInt64Length - 4); 327Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatUInt64Length - 4); 361Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatUInt64Length - 5 - _newLineLength); 407Debug.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)
80Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 4); 114Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 4 - _newLineLength); 195Debug.Assert(utf8Value.Length < int.MaxValue - 4); 221Debug.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> 51/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882 (<see cref="int.MaxValue"/> / 3).</exception> 82/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than or equal to <see cref="int.MaxValue"/>.</exception> 105if (utf8Json.Length == int.MaxValue) 107ThrowHelper.ThrowArgumentException_ValueTooLarge(int.MaxValue); 118/// <exception cref="ArgumentException">Thrown if the length of the input is zero or equal to <see cref="int.MaxValue"/>.</exception> 147if (utf8JsonLen >= int.MaxValue) 168Debug.Assert(utf8JsonLen < int.MaxValue); 241Debug.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\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (5)
135Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 166Debug.Assert(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding)); 304Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); 332Debug.Assert(escapedValue.Length < int.MaxValue - 3); 361if (value.Length > Base64.GetMaxDecodedFromUtf8Length(int.MaxValue))
System.Text.RegularExpressions (85)
System\Text\RegularExpressions\MatchCollection.cs (1)
111GetMatch(int.MaxValue);
System\Text\RegularExpressions\Regex.EnumerateSplits.cs (1)
200_remainingCount = count != 0 ? count : int.MaxValue; // Maintain same behavior as Split(..., count: 0, ...), which treats it as effectively infinite.
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 (11)
1250Debug.Assert(target.LoopNode.N == int.MaxValue); 3516if (node.N != int.MaxValue) 3835Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4166if (maxIterations != int.MaxValue) 4435if (maxIterations != int.MaxValue) 4446else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4459else if (maxIterations == int.MaxValue && CanEmitIndexOf(node, out _)) 4550if (maxIterations != int.MaxValue) 4693Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4731Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4863switch ((minIterations > 0, maxIterations == int.MaxValue, iterationMayBeEmpty))
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
823Debug.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) 1646if (nodeMin == int.MaxValue || 1647nextMin == int.MaxValue || 1648(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1654if (nodeMax != int.MaxValue && 1655nextMax != int.MaxValue && 1656(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1685if (currentNode.N != int.MaxValue) 1687currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1699if (currentNode.N != int.MaxValue) 1726if (currentNode.N != int.MaxValue) 1768currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2291return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2323return (int)Math.Min(int.MaxValue - 1, sum); 2393return N == int.MaxValue ? null : N; 2396if (N != int.MaxValue) 2402if (maxLength < int.MaxValue) 2457if (sum < int.MaxValue) 2945(M == 0 && N == int.MaxValue) ? "*" : 2947(M == 1 && N == int.MaxValue) ? "+" : 2948(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; 918if (length <= int.MaxValue) 937if (length <= int.MaxValue) 1180else if (loop._upper == int.MaxValue) 1218int newupper = _upper == int.MaxValue ? int.MaxValue : _upper - 1; 1220int newlower = _lower is 0 or int.MaxValue ? _lower : _lower - 1; 1716if (_upper == int.MaxValue) 1988return (_upper < int.MaxValue) && (_upper > upperBoundLowestValue); 2294if (_upper == int.MaxValue) 2296if (_lower is 0 or int.MaxValue) 2333return (int)Math.Min((long)m + n, int.MaxValue); 2340return (int)Math.Min((long)m * n, int.MaxValue);
System\Text\RegularExpressions\Symbolic\SymbolicRegexRunnerFactory.cs (1)
30if (threshold != int.MaxValue)
System.Text.RegularExpressions.Generator (60)
RegexGenerator.Emitter.cs (20)
1364Debug.Assert(target.LoopNode.N == int.MaxValue); 3480if (node.N != int.MaxValue) 3694Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 3938if (maxIterations != int.MaxValue || iterationMayBeEmpty) 3943if (maxIterations == int.MaxValue) 4143if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4158string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4166else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4174else if (maxIterations == int.MaxValue && TryEmitIndexOf(requiredHelpers, node, useLast: false, negate: true, out _, out string? indexOfExpr)) 4203if (minIterations != 0 || maxIterations != int.MaxValue) 4214string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4288Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4308Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4434if (maxIterations == int.MaxValue && !iterationMayBeEmpty) 4451else if (minIterations > 0 && maxIterations == int.MaxValue) 4467else if (maxIterations == int.MaxValue) 5627(0, int.MaxValue) => " any number of times", 5628(1, int.MaxValue) => " at least once", 5629(2, int.MaxValue) => " at least twice", 5630(_, 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) 1646if (nodeMin == int.MaxValue || 1647nextMin == int.MaxValue || 1648(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1654if (nodeMax != int.MaxValue && 1655nextMax != int.MaxValue && 1656(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1685if (currentNode.N != int.MaxValue) 1687currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1699if (currentNode.N != int.MaxValue) 1726if (currentNode.N != int.MaxValue) 1768currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2291return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2323return (int)Math.Min(int.MaxValue - 1, sum); 2393return N == int.MaxValue ? null : N; 2396if (N != int.MaxValue) 2402if (maxLength < int.MaxValue) 2457if (sum < int.MaxValue) 2945(M == 0 && N == int.MaxValue) ? "*" : 2947(M == 1 && N == int.MaxValue) ? "+" : 2948(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)
819/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 840/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 893/// timeout is a negative number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 916/// 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.Web.Services.Description (2)
System\Web\Services\Description\MimeFormatExtensions.cs (2)
151get { return _repeats == int.MaxValue ? "*" : _repeats.ToString(CultureInfo.InvariantCulture); } 155_repeats = int.MaxValue;
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (1)
81return int.MaxValue;
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonWindowSmallIconConverter.cs (1)
91int bestScore = int.MaxValue;
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
452int.MaxValue,
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (1)
329public static readonly DependencyProperty MaxColumnCountProperty = RibbonGallery.MaxColumnCountProperty.AddOwner(typeof(RibbonGalleryCategory), new FrameworkPropertyMetadata(int.MaxValue, FrameworkPropertyMetadataOptions.AffectsMeasure, new PropertyChangedCallback(OnNotifyPropertyChanged), new CoerceValueCallback(CoerceMaxColumnCount)));
System.Windows.Forms (53)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
3255Select(0, int.MaxValue);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
7809int lRowIndex = int.MaxValue;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
2552Size requiredSize = TextRenderer.MeasureText(text, font, new Size(maxWidth, int.MaxValue), flags); 2591textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, int.MaxValue), flags); 2620return TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (3)
241if (value == int.MaxValue) 243throw new ArgumentOutOfRangeException(nameof(value), value, string.Format(SR.DataGridViewColumn_DisplayIndexTooLarge, int.MaxValue)); 307Debug.Assert(value < int.MaxValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (3)
211smallestDisplayIndex = int.MaxValue; 743int indexMin = int.MaxValue, displayIndexMin = int.MaxValue;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
828return MeasureTextHeight(graphics, " ", cellStyle.Font!, int.MaxValue, TextFormatFlags.Default) + adjustment;
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (2)
322Size sizeRequired = TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
515textSize = hdc.HDC.MeasureText(Text, hfont, new Size(textRectangle.Width, int.MaxValue), (TextFormatFlags)flags);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (3)
105MaxLength = int.MaxValue; 486[DefaultValue(int.MaxValue)] 2914PInvokeCore.SendMessage(this, PInvokeCore.EM_EXLIMITTEXT, 0, int.MaxValue);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1821end = start > 0 ? int.MaxValue : int.MinValue;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
298proposedSize.Width = int.MaxValue; 303proposedSize.Height = int.MaxValue;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
27internal static Point s_invalidMouseEnter = new(int.MaxValue, int.MaxValue); 2239proposedSize.Width = int.MaxValue; 2244proposedSize.Height = int.MaxValue;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
814int minY = int.MaxValue, maxY = 0;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
1942int.MaxValue,
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (1)
395nSizeMax = _maxSize == 0 ? int.MaxValue : _maxSize,
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (2)
781if (_buttons.Count > int.MaxValue - CustomButtonStartID + 1 || 782_radioButtons.Count > int.MaxValue - RadioButtonStartID + 1)
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
208Size textSize = new(_scaledMaxWidth - _scaledPaddingWidth, int.MaxValue);
System\Windows\Forms\Form.cs (2)
6792mmi->ptMaxTrackSize.Y = int.MaxValue; 6797mmi->ptMaxTrackSize.X = int.MaxValue;
System\Windows\Forms\Layout\FlowLayout.cs (2)
71displayRect.Width = int.MaxValue - displayRect.X; 187Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height);
System\Windows\Forms\Layout\LayoutUtils.cs (6)
13public static readonly Size s_maxSize = new(int.MaxValue, int.MaxValue); 16public static readonly Rectangle s_maxRectangle = new(0, 0, int.MaxValue, int.MaxValue); 128size.Width = int.MaxValue; 133size.Height = int.MaxValue;
System\Windows\Forms\Layout\TableLayout.cs (5)
283xAssignRowsAndColumns(containerInfo, childrenInfo, numCols, numRows == 0 ? int.MaxValue : numRows, growStyle); 306xAssignRowsAndColumns(containerInfo, childrenInfo, maxColumns: Math.Max(minColumn, 1), maxRows: int.MaxValue, growStyle); 446numRows = (numRows == int.MaxValue) ? rowStop : Math.Max(numRows, rowStop); 447numColumns = (numColumns == int.MaxValue) ? colStop : Math.Max(numColumns, colStop); 467numRows = (maxRows == int.MaxValue) ? numRows : maxRows;
System\Windows\Forms\Rendering\TextExtensions.cs (4)
86if (bounds.Width == int.MaxValue) 91if (bounds.Height == int.MaxValue) 252if (proposedSize.Height == int.MaxValue && dt.HasFlag(DRAW_TEXT_FORMAT.DT_SINGLELINE)) 258if (proposedSize.Width == int.MaxValue)
System\Windows\Forms\Rendering\TextRenderer.cs (2)
23internal static Size MaxSize { get; } = new(int.MaxValue, int.MaxValue);
System.Windows.Forms.Design (29)
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (2)
36Size checkBoxPreferredSize = _checkBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (2)
45Size linkLabelSize = _linkLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (4)
56Size titleSize = _titleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 60subtitleSize = _subtitleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (10)
83return LineLeftMargin + _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width + TextBoxLineCenterMargin; 94int textBoxPreferredHeight = _textBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Height; 110int labelPreferredWidth = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width; 137_textBox.Location = new Point(int.MaxValue, int.MaxValue); 144_readOnlyTextBoxLabel.Location = new Point(int.MaxValue, int.MaxValue);
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
40Size labelSize = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
35Size panelSize = CurrentPanel.GetPreferredSize(new Size(150, int.MaxValue));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
696int maxRange = directionOffset.X < 0 ? currentBounds.Right : int.MaxValue; 715int maxRange = directionOffset.Y < 0 ? currentBounds.Bottom : int.MaxValue;
System\Windows\Forms\Design\CommandSet.cs (2)
1268int top = int.MaxValue; 1269int left = int.MaxValue;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (4)
183int currentMinTopLeft = int.MaxValue; 190lastOffset = int.MaxValue; 250currentMinTopLeft = int.MaxValue; 281currentMinTopLeft = int.MaxValue;
System.Windows.Forms.Design.Tests (9)
System\ComponentModel\Design\ByteViewerTests.cs (6)
184[InlineData(int.MaxValue, false)] 211[InlineData((ControlStyles)int.MaxValue, false)] 916yield return new object[] { Array.Empty<byte>(), int.MaxValue }; 920yield return new object[] { new byte[] { 1, 2, 3 }, int.MaxValue }; 924yield return new object[] { new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, int.MaxValue }; 946[InlineData(int.MaxValue)]
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (1)
111[InlineData(DefaultOffset, int.MaxValue, /* overflown */-2147483526)]
System\Windows\Forms\Design\ControlDesigner.TransparentBehaviorTests.cs (2)
83DragEventArgs dragEventArgs = new(null, 0, int.MaxValue, int.MaxValue, DragDropEffects.Copy, DragDropEffects.Copy);
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
634[InlineData(int.MaxValue)]
System.Windows.Forms.Primitives.Tests (17)
Interop\Oleaut32\DECIMALTests.cs (1)
30[InlineData((double)int.MaxValue)]
Interop\Oleaut32\VARIANTTests.cs (12)
183yield return new object[] { VT_I1, (nint)int.MaxValue, (sbyte)(-1) }; 244yield return new object[] { VT_I4, (nint)int.MaxValue, int.MaxValue }; 275yield return new object[] { VT_INT, (nint)int.MaxValue, int.MaxValue }; 310yield return new object[] { VT_ERROR, (nint)int.MaxValue, int.MaxValue }; 403yield return new object[] { (nint)int.MaxValue, (long)int.MaxValue }; 429yield return new object[] { int.MaxValue }; 692yield return new object[] { (nint)int.MaxValue, int.MaxValue };
System\Windows\Forms\Automation\UiaTextRangeTests.cs (4)
91[InlineData(int.MaxValue)] 103[InlineData(int.MaxValue)] 169[InlineData(int.MaxValue)] 184[InlineData(int.MaxValue)]
System.Windows.Forms.Primitives.TestUtilities (1)
PlatformDetection.cs (1)
36byte[] tmp = new byte[int.MaxValue];
System.Windows.Forms.Primitives.TestUtilities.Tests (2)
ComparisonHelpersTests.cs (2)
17[InlineData(int.MinValue, int.MinValue, int.MaxValue, true)] 32[InlineData(int.MinValue, int.MinValue, int.MaxValue, true)]
System.Windows.Forms.Tests (558)
CheckedListBoxTests.cs (2)
256[InlineData(int.MaxValue)] 357[InlineData(int.MaxValue)]
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
186[InlineData((AccessibleSelection)int.MaxValue)]
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
92int.MaxValue,
System\Windows\Forms\ButtonBaseTests.cs (7)
5006yield return new object[] { flatStyle, new Size(int.MaxValue, int.MaxValue) }; 5081[InlineData((ControlStyles)int.MaxValue, false)] 6701yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 1 }; 6768yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 0 };
System\Windows\Forms\ButtonTests.cs (73)
1178yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(14, 9) }; 1179yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(14, 9) }; 1180yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(14, 9) }; 1191yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1192yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1193yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1227yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(18, 15) }; 1228yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(18, 15) }; 1229yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1240yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1241yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1242yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1277yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(18, 15) }; 1278yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(18, 15) }; 1279yield return new object[] { AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1290yield return new object[] { AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(18, 15) }; 1291yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(18, 15) }; 1292yield return new object[] { AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(18, 15) }; 1387yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(8, 8) }; 1388yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(8, 8) }; 1389yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(8, 8) }; 1400yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) }; 1401yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) }; 1402yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) }; 1413yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(6, 6) }; 1414yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(6, 6) }; 1415yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(6, 6) }; 1428yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1429yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1430yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1465yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) }; 1466yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) }; 1467yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1478yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1479yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1480yield return new object[] { FlatStyle.Popup, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1491yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1492yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1493yield return new object[] { FlatStyle.Standard, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1506yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(75, 23) }; 1507yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(75, 23) }; 1508yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(75, 23) }; 1544yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(12, 14) }; 1545yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(12, 14) }; 1546yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1557yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(12, 14) }; 1558yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(12, 14) }; 1559yield return new object[] { FlatStyle.Flat, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(12, 14) }; 1572yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(30, int.MaxValue), new Size(10, 12) }; 1573yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, 40), new Size(10, 12) }; 1574yield return new object[] { flatStyle, AutoSizeMode.GrowAndShrink, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1585yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(30, int.MaxValue), new Size(10, 12) }; 1586yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, 40), new Size(10, 12) }; 1587yield return new object[] { flatStyle, AutoSizeMode.GrowOnly, new Size(int.MaxValue, int.MaxValue), new Size(10, 12) }; 1787[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\CheckBoxTests.cs (1)
515[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ComboBoxTests.cs (3)
227[InlineData(int.MaxValue, int.MaxValue)] 1473[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ContainerControlTests.cs (2)
504[InlineData(int.MaxValue, false)] 531[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ControlTests.Methods.cs (24)
24yield return new object[] { AccessibleEvents.DescriptionChange, int.MaxValue }; 29yield return new object[] { (AccessibleEvents)0, int.MaxValue }; 30yield return new object[] { (AccessibleEvents)int.MaxValue, int.MinValue }; 31yield return new object[] { (AccessibleEvents)int.MaxValue, -1 }; 32yield return new object[] { (AccessibleEvents)int.MaxValue, 0 }; 33yield return new object[] { (AccessibleEvents)int.MaxValue, 1 }; 34yield return new object[] { (AccessibleEvents)int.MaxValue, int.MaxValue }; 67yield return new object[] { AccessibleEvents.DescriptionChange, int.MaxValue, int.MinValue }; 71yield return new object[] { AccessibleEvents.DescriptionChange, int.MinValue, int.MaxValue }; 72yield return new object[] { (AccessibleEvents)0, int.MaxValue, int.MinValue }; 76yield return new object[] { (AccessibleEvents)0, int.MinValue, int.MaxValue }; 77yield return new object[] { (AccessibleEvents)int.MaxValue, int.MaxValue, int.MinValue }; 78yield return new object[] { (AccessibleEvents)int.MaxValue, 1, -1 }; 79yield return new object[] { (AccessibleEvents)int.MaxValue, 0, 0 }; 80yield return new object[] { (AccessibleEvents)int.MaxValue, 1, 1 }; 81yield return new object[] { (AccessibleEvents)int.MaxValue, int.MinValue, int.MaxValue }; 2322yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 2368yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(int.MaxValue, int.MaxValue), new Size(10, 20) }; 2842[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ControlTests.Properties.cs (44)
332yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right }; 405yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 530yield return new object[] { oldValue, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2 }; 614yield return new object[] { oldValue, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, 1, 2, 0, 0 }; 761yield return new object[] { dock, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 815yield return new object[] { dock, (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None, 1 }; 7924yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 7992yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(2, 3), 0 }; 8095yield return new object[] { new Size(int.MaxValue, int.MaxValue), 1 }; 8150yield return new object[] { new Size(int.MaxValue, int.MaxValue), 1 }; 8533yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8577yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8630yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1 }; 8739yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1, 1 }; 8800yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(int.MaxValue, int.MaxValue), 1, 1 }; 8865yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8922yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8988yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 9047yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9135yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 };
System\Windows\Forms\DataFormatsTests.cs (1)
163[InlineData("name", int.MaxValue)]
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
1118[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\DateTimePickerTests.cs (1)
881[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\Design\ComponentEditorFormTests.cs (2)
206[InlineData(int.MaxValue, false)] 234[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\Design\ComponentEditorPageTests.cs (2)
669[InlineData(int.MaxValue, false)] 696[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\DomainUpDownTests.cs (2)
1058[InlineData(int.MaxValue, false)] 1084[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\FlowLayoutPanelTests.cs (2)
271[InlineData(int.MaxValue, false)] 298[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\FontDialogTests.cs (9)
391[InlineData(int.MaxValue, int.MaxValue)] 412[InlineData(int.MaxValue, int.MaxValue, int.MaxValue)] 433[InlineData(int.MaxValue, int.MaxValue)] 454[InlineData(int.MaxValue, int.MaxValue, 10)]
System\Windows\Forms\FormTests.cs (2)
2422[InlineData(int.MaxValue, false)] 2449[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\GroupBoxTests.cs (1)
1433[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\HScrollBarTests.cs (1)
228[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\HtmlDocumentTests.cs (2)
1755Assert.Equal("BODY", document.GetElementFromPoint(new Point(int.MaxValue, int.MaxValue)).TagName);
System\Windows\Forms\LabelTests.cs (1)
165[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (14)
683[InlineData(int.MaxValue)] 715[InlineData(int.MaxValue, 1)] 772[InlineData(int.MaxValue)] 798[InlineData(int.MaxValue)] 921[InlineData(int.MaxValue)] 1005[InlineData(int.MaxValue)] 1029[InlineData(int.MaxValue)] 1159[InlineData(int.MaxValue)] 1191[InlineData(int.MaxValue, 1)] 1248[InlineData(int.MaxValue)] 1274[InlineData(int.MaxValue)] 1397[InlineData(int.MaxValue)] 1481[InlineData(int.MaxValue)] 1505[InlineData(int.MaxValue)]
System\Windows\Forms\ListBoxTests.cs (11)
657[InlineData(int.MaxValue)] 676[InlineData(int.MaxValue)] 697[InlineData(int.MaxValue)] 728[InlineData(int.MaxValue, 0)] 4314[InlineData(int.MaxValue)] 4335[InlineData(int.MaxValue)] 4358[InlineData(int.MaxValue)] 4393[InlineData(int.MaxValue)] 4796yield return new object[] { borderStyle, new Size(int.MaxValue, int.MaxValue) }; 4917[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ListControlTests.cs (1)
2582[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ListViewGroupTests.cs (1)
251int value = random.Next(2, int.MaxValue) * -1;
System\Windows\Forms\ListViewTests.cs (1)
4274[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\MenuStripTests.cs (2)
504[InlineData(int.MaxValue, false)] 531[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\MonthCalendarTests.cs (2)
1387yield return new object[] { int.MaxValue }; 3343[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\PanelTests.cs (2)
845[InlineData(int.MaxValue, false)] 872[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\PictureBoxTests.cs (1)
1888[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ProgressBarTests.cs (5)
769yield return new object[] { style, int.MaxValue }; 907yield return new object[] { int.MaxValue }; 1031[InlineData(int.MaxValue)] 1350yield return new object[] { int.MaxValue }; 1817[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\PropertyGridTests.cs (2)
3466[InlineData(int.MaxValue, false)] 3493[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\RadioButtonTests.cs (1)
642[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\RichTextBoxTests.cs (34)
100Assert.Equal(int.MaxValue, control.MaxLength); 858[InlineData(int.MaxValue)] 879[InlineData(int.MaxValue)] 916[InlineData(int.MaxValue, 0)] 1601dwMask = (CFM_MASK)int.MaxValue 1623dwMask = (CFM_MASK)int.MaxValue 1953[InlineData(int.MaxValue)] 1987[InlineData(int.MaxValue)] 2042[InlineData(int.MaxValue, 0x7FFFFFFF)] 2485[InlineData(int.MaxValue)] 2506[InlineData(int.MaxValue)] 2529[InlineData(int.MaxValue)] 2562[InlineData(int.MaxValue, 0)] 4936dwMask = (CFM_MASK)int.MaxValue 5041[InlineData(int.MaxValue, 0)] 5068[InlineData(int.MaxValue, 0)] 5107[InlineData(int.MaxValue, 0)] 5147[InlineData(int.MaxValue, 0)] 5280[InlineData(int.MaxValue, 0)] 5303[InlineData(int.MaxValue, 0)] 5338[InlineData(int.MaxValue, 0)] 5868[InlineData(int.MaxValue, 0)] 5889[InlineData(int.MaxValue, 0)] 5922[InlineData(int.MaxValue, 0)] 7844yield return new object[] { new DataFormats.Format("UnknownName", int.MaxValue), false }; 8896yield return new object[] { (IntPtr)int.MaxValue }; 8898yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue) }; 8936yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 8938yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), -1 }; 8990[InlineData((ControlStyles)int.MaxValue, false)] 9206yield return new object[] { int.MaxValue, 1 }; 9207yield return new object[] { 1, int.MaxValue };
System\Windows\Forms\ScreenTests.cs (6)
112yield return new object[] { new Point(int.MaxValue, int.MaxValue) }; 129yield return new object[] { new Rectangle(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue) };
System\Windows\Forms\ScrollableControlTests.cs (2)
1342[InlineData(int.MaxValue, false)] 1369[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ScrollBarTests.cs (1)
1881[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\SplitterTests.cs (1)
1660[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\StatusStripTests.cs (2)
1089[InlineData(int.MaxValue, false)] 1116[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\TabControl.ControlCollectionTests.cs (14)
774item.cchTextMax = int.MaxValue; 783Assert.Equal(int.MaxValue, item.cchTextMax); 791Assert.Equal(int.MaxValue, item.cchTextMax); 799Assert.Equal(int.MaxValue, item.cchTextMax); 842item.cchTextMax = int.MaxValue; 851Assert.Equal(int.MaxValue, item.cchTextMax); 859Assert.Equal(int.MaxValue, item.cchTextMax); 867Assert.Equal(int.MaxValue, item.cchTextMax); 1486item.cchTextMax = int.MaxValue; 1495Assert.Equal(int.MaxValue, item.cchTextMax); 1503Assert.Equal(int.MaxValue, item.cchTextMax); 1544item.cchTextMax = int.MaxValue; 1553Assert.Equal(int.MaxValue, item.cchTextMax); 1561Assert.Equal(int.MaxValue, item.cchTextMax);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (30)
780item.cchTextMax = int.MaxValue; 789Assert.Equal(int.MaxValue, item.cchTextMax); 797Assert.Equal(int.MaxValue, item.cchTextMax); 805Assert.Equal(int.MaxValue, item.cchTextMax); 850item.cchTextMax = int.MaxValue; 859Assert.Equal(int.MaxValue, item.cchTextMax); 867Assert.Equal(int.MaxValue, item.cchTextMax); 875Assert.Equal(int.MaxValue, item.cchTextMax); 2806item.cchTextMax = int.MaxValue; 2815Assert.Equal(int.MaxValue, item.cchTextMax); 2823Assert.Equal(int.MaxValue, item.cchTextMax); 2831Assert.Equal(int.MaxValue, item.cchTextMax); 2874item.cchTextMax = int.MaxValue; 2883Assert.Equal(int.MaxValue, item.cchTextMax); 2891Assert.Equal(int.MaxValue, item.cchTextMax); 2899Assert.Equal(int.MaxValue, item.cchTextMax); 3561item.cchTextMax = int.MaxValue; 3570Assert.Equal(int.MaxValue, item.cchTextMax); 3578Assert.Equal(int.MaxValue, item.cchTextMax); 3586Assert.Equal(int.MaxValue, item.cchTextMax); 3633item.cchTextMax = int.MaxValue; 3642Assert.Equal(int.MaxValue, item.cchTextMax); 3650Assert.Equal(int.MaxValue, item.cchTextMax); 3658Assert.Equal(int.MaxValue, item.cchTextMax); 4606item.cchTextMax = int.MaxValue; 4615Assert.Equal(int.MaxValue, item.cchTextMax); 4623Assert.Equal(int.MaxValue, item.cchTextMax); 4666item.cchTextMax = int.MaxValue; 4675Assert.Equal(int.MaxValue, item.cchTextMax); 4683Assert.Equal(int.MaxValue, item.cchTextMax);
System\Windows\Forms\TabControlTests.cs (9)
1062item.cchTextMax = int.MaxValue; 1071Assert.Equal(int.MaxValue, item.cchTextMax); 1079Assert.Equal(int.MaxValue, item.cchTextMax); 1087Assert.Equal(int.MaxValue, item.cchTextMax); 3949[InlineData((ControlStyles)int.MaxValue, false)] 4937item.cchTextMax = int.MaxValue; 4946Assert.Equal(int.MaxValue, item.cchTextMax); 4954Assert.Equal(int.MaxValue, item.cchTextMax); 4962Assert.Equal(int.MaxValue, item.cchTextMax);
System\Windows\Forms\TableLayoutPanelTests.cs (10)
1161[InlineData(int.MaxValue, false)] 1188[InlineData((ControlStyles)int.MaxValue, false)] 1665[InlineData(int.MaxValue)] 1696[InlineData(int.MaxValue, 1)] 1776[InlineData(int.MaxValue)] 1805[InlineData(int.MaxValue, 1)] 1892[InlineData(int.MaxValue)] 1923[InlineData(int.MaxValue, 1)] 2003[InlineData(int.MaxValue)] 2032[InlineData(int.MaxValue, 1)]
System\Windows\Forms\TabPageTests.cs (34)
1391item.cchTextMax = int.MaxValue; 1400Assert.Equal(int.MaxValue, item.cchTextMax); 1408Assert.Equal(int.MaxValue, item.cchTextMax); 1416Assert.Equal(int.MaxValue, item.cchTextMax); 1458item.cchTextMax = int.MaxValue; 1467Assert.Equal(int.MaxValue, item.cchTextMax); 1475Assert.Equal(int.MaxValue, item.cchTextMax); 1483Assert.Equal(int.MaxValue, item.cchTextMax); 1766item.cchTextMax = int.MaxValue; 1775Assert.Equal(int.MaxValue, item.cchTextMax); 1783Assert.Equal(int.MaxValue, item.cchTextMax); 1791Assert.Equal(int.MaxValue, item.cchTextMax); 1830item.cchTextMax = int.MaxValue; 1839Assert.Equal(int.MaxValue, item.cchTextMax); 1847Assert.Equal(int.MaxValue, item.cchTextMax); 1855Assert.Equal(int.MaxValue, item.cchTextMax); 3022item.cchTextMax = int.MaxValue; 3031Assert.Equal(int.MaxValue, item.cchTextMax); 3039Assert.Equal(int.MaxValue, item.cchTextMax); 3047Assert.Equal(int.MaxValue, item.cchTextMax); 3089item.cchTextMax = int.MaxValue; 3098Assert.Equal(int.MaxValue, item.cchTextMax); 3106Assert.Equal(int.MaxValue, item.cchTextMax); 3114Assert.Equal(int.MaxValue, item.cchTextMax); 3395item.cchTextMax = int.MaxValue; 3404Assert.Equal(int.MaxValue, item.cchTextMax); 3412Assert.Equal(int.MaxValue, item.cchTextMax); 3420Assert.Equal(int.MaxValue, item.cchTextMax); 3459item.cchTextMax = int.MaxValue; 3468Assert.Equal(int.MaxValue, item.cchTextMax); 3476Assert.Equal(int.MaxValue, item.cchTextMax); 3484Assert.Equal(int.MaxValue, item.cchTextMax); 3767[InlineData(int.MaxValue, false)] 3794[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\TextRendererTests.cs (35)
99yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)int.MaxValue }; 140yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 166yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red }; 198yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue }; 234yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.Default, }; 245yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.SingleLine }; 248yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)int.MaxValue }; 274yield return new object[] { hint, text, null, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Blue, Color.Blue, TextFormatFlags.Default, }; 289yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue, TextFormatFlags.SingleLine }; 292yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue }; 419yield return new object[] { "string", null, new Size(int.MaxValue, int.MaxValue) }; 423yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue) }; 443yield return new object[] { "string", null, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default }; 447yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default }; 452yield return new object[] { "string", SystemFonts.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.SingleLine }; 455yield return new object[] { "string", SystemFonts.MenuFont, new Size(100, 200), (TextFormatFlags)int.MaxValue }; 702new Rectangle(0, 0, int.MaxValue, int.MaxValue), 733new Size(int.MaxValue, int.MaxValue), 772new Rectangle(0, 0, int.MaxValue, int.MaxValue), 820new Size(int.MaxValue, int.MaxValue),
System\Windows\Forms\ToolStripButtonTests.cs (2)
1084yield return new object[] { new Size(int.MaxValue, int.MaxValue) };
System\Windows\Forms\ToolStripContentPanelTests.cs (2)
1665[InlineData(int.MaxValue, false)] 1692[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ToolStripControlHostTests.cs (5)
741[InlineData((ContentAlignment)int.MaxValue)] 1260[InlineData((ContentAlignment)int.MaxValue)] 2321[InlineData((ContentAlignment)int.MaxValue)] 2716yield return new object[] { new Size(int.MaxValue, int.MaxValue) };
System\Windows\Forms\ToolStripDropDownTests.cs (3)
590yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 3636[InlineData(int.MaxValue, false)] 3663[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ToolStripItemTests.cs (4)
4373[InlineData((ContentAlignment)int.MaxValue)] 8489[InlineData((ContentAlignment)int.MaxValue)] 10304yield return new object[] { new Size(int.MaxValue, int.MaxValue) };
System\Windows\Forms\ToolStripPanelTests.cs (1)
326[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\ToolStripSeparatorTests.cs (26)
464[InlineData((ContentAlignment)int.MaxValue)] 641[InlineData((ContentAlignment)int.MaxValue)] 751yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 771yield return new object[] { ToolStripLayoutStyle.Flow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 777yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 783yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 789yield return new object[] { ToolStripLayoutStyle.Table, new Size(int.MaxValue, int.MaxValue), new Size(6, 23) }; 795yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(23, 6) }; 824yield return new object[] { layoutStyle, new Size(int.MaxValue, int.MaxValue) }; 870yield return new object[] { ToolStripLayoutStyle.Flow, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 876yield return new object[] { ToolStripLayoutStyle.HorizontalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 882yield return new object[] { ToolStripLayoutStyle.StackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(52, 6) }; 888yield return new object[] { ToolStripLayoutStyle.Table, new Size(int.MaxValue, int.MaxValue), new Size(91, 6) }; 894yield return new object[] { ToolStripLayoutStyle.VerticalStackWithOverflow, new Size(int.MaxValue, int.MaxValue), new Size(52, 6) };
System\Windows\Forms\ToolStripTests.cs (3)
769yield return new object[] { (AnchorStyles)int.MaxValue, AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, DockStyle.None }; 4914[InlineData(int.MaxValue, false)] 4941[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\TreeViewTests.cs (9)
4769yield return new object[] { new Point(int.MaxValue, int.MaxValue) }; 4814yield return new object[] { new Point(int.MaxValue, int.MaxValue) }; 5064[InlineData((ControlStyles)int.MaxValue, false)] 5094yield return new object[] { new Point(int.MaxValue, int.MaxValue), TreeViewHitTestLocations.BelowClientArea | TreeViewHitTestLocations.RightOfClientArea }; 5146yield return new object[] { new Point(int.MaxValue, int.MaxValue), TreeViewHitTestLocations.BelowClientArea | TreeViewHitTestLocations.RightOfClientArea };
System\Windows\Forms\UpDownBaseTests.cs (11)
1097yield return new object[] { new Size(int.MaxValue, int.MaxValue), 120, 0 }; 1141yield return new object[] { new Size(int.MaxValue, int.MaxValue), int.MaxValue, 1 }; 1585yield return new object[] { new Size(int.MaxValue, int.MaxValue) }; 1641yield return new object[] { new Size(10, 20), new Size(40, 50), new Size(int.MaxValue, int.MaxValue), 40 }; 1674[InlineData(int.MaxValue, false)] 1701[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\UserControlTests.cs (2)
889[InlineData(int.MaxValue, false)] 916[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (2)
23yield return new object[] { VisualStyleElement.CreateElement("BUTTON", 0, int.MaxValue) }; 50yield return new object[] { VisualStyleElement.CreateElement("BUTTON", int.MaxValue, 0) };
System\Windows\Forms\VScrollBarTests.cs (1)
218[InlineData((ControlStyles)int.MaxValue, false)]
System\Windows\Forms\WebBrowserTests.cs (1)
2835[InlineData((ControlStyles)int.MaxValue, false)]
Text\FontMetrics.cs (20)
114{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(173, 15) }, 115{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(215, 18) }, 116{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(299, 26) }, 117{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(179, 17) }, 118{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_BOTTOM, new Size(189, 14) }, 124{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(173, 15) }, 125{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(215, 18) }, 126{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(299, 26) }, 127{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(179, 17) }, 128{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)DRAW_TEXT_FORMAT.DT_SINGLELINE, new Size(189, 14) },
TextBoxBaseTests.cs (33)
1687[InlineData(int.MaxValue)] 1721[InlineData(int.MaxValue)] 1776[InlineData(int.MaxValue, 0x7FFFFFFE)] 4279yield return new object[] { new Point(int.MaxValue, int.MaxValue), "t" }; 4393yield return new object[] { new Point(int.MaxValue, int.MaxValue), 3 }; 4480yield return new object[] { string.Empty, (IntPtr)int.MaxValue, 0 }; 4489yield return new object[] { "text", (IntPtr)int.MaxValue, 3 }; 4591yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4593yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), -1 }; 4681yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4683yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), -1 }; 4800yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4802yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), -1 }; 4958yield return new object[] { PARAM.FromLowHigh(int.MaxValue, int.MaxValue), new Point(-1, -1) }; 5002yield return new object[] { multiline, wordWrap, BorderStyle.Fixed3D, new Size(int.MaxValue, int.MaxValue), new Size(4, s_preferredHeight) }; 5008yield return new object[] { multiline, wordWrap, BorderStyle.FixedSingle, new Size(int.MaxValue, int.MaxValue), new Size(4, s_preferredHeight) }; 5014yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(int.MaxValue, int.MaxValue), new Size(0, Control.DefaultFont.Height) }; 5063yield return new object[] { BorderStyle.Fixed3D, new Size(int.MaxValue, int.MaxValue), 4, s_preferredHeight }; 5069yield return new object[] { BorderStyle.FixedSingle, new Size(int.MaxValue, int.MaxValue), 4, s_preferredHeight }; 5075yield return new object[] { BorderStyle.None, new Size(int.MaxValue, int.MaxValue), 0, Control.DefaultFont.Height }; 5161[InlineData((ControlStyles)int.MaxValue, false)]
TextBoxTests.cs (1)
514[InlineData((ControlStyles)int.MaxValue, false)]
TrackBarTests.cs (25)
1859[InlineData(int.MaxValue)] 1880[InlineData(int.MaxValue, 1)] 2292[InlineData((ControlStyles)int.MaxValue, false)] 3153yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(-1, int.MaxValue) }; 3154yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(0, int.MaxValue) }; 3155yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(1, int.MaxValue) }; 3156yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(2, int.MaxValue) }; 3157yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(3, int.MaxValue) }; 3158yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(4, int.MaxValue) }; 3159yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(5, int.MaxValue) }; 3160yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(6, int.MaxValue) }; 3161yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(7, int.MaxValue) }; 3162yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(8, int.MaxValue) }; 3163yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, PARAM.FromLowHigh(9, int.MaxValue) }; 3166yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(-1, int.MaxValue) }; 3167yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(0, int.MaxValue) }; 3168yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(1, int.MaxValue) }; 3169yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(2, int.MaxValue) }; 3170yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(3, int.MaxValue) }; 3171yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(4, int.MaxValue) }; 3172yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(5, int.MaxValue) }; 3173yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(6, int.MaxValue) }; 3174yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(7, int.MaxValue) }; 3175yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(8, int.MaxValue) }; 3176yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, PARAM.FromLowHigh(9, int.MaxValue) };
WebBrowserBaseTests.cs (1)
783[InlineData((ControlStyles)int.MaxValue, false)]
System.Xaml (2)
System\Xaml\Schema\MemberReflector.cs (2)
16private const DesignerSerializationVisibility VisibilityInvalid = (DesignerSerializationVisibility)int.MaxValue; 18private const DesignerSerializationVisibility VisibilityNone = (DesignerSerializationVisibility)(int.MaxValue - 1);
Test.Utilities (2)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
Text.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
786int minOrdinal = int.MaxValue;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
VersioningWebSite (1)
Controllers\CustomersController.cs (1)
46[Version(MinVersion = 2, Order = int.MaxValue)]
WindowsBase.Tests (8)
System\Windows\Input\KeyConverterTests.cs (1)
150[InlineData((Key)int.MaxValue)]
System\Windows\Input\KeyInteropTests.cs (2)
250[InlineData(int.MaxValue, Key.None)] 458[InlineData((Key)int.MaxValue, 0)]
System\Windows\Input\KeyValueSerializerTests.cs (1)
51[InlineData((Key)int.MaxValue)]
System\Windows\Input\ModifierKeysConverterTests.cs (1)
108yield return new object[] { (ModifierKeys)int.MaxValue };
System\Windows\Threading\DispatcherTimerTests.cs (3)
64yield return new object?[] { TimeSpan.FromMilliseconds(int.MaxValue), DispatcherPriority.ContextIdle }; 115yield return new object[] { TimeSpan.FromMilliseconds((double)int.MaxValue + 1) }; 157yield return new object[] { TimeSpan.FromMilliseconds(int.MaxValue) };
WindowsFormsIntegration (10)
System\Windows\Integration\Convert.cs (2)
307if (value > int.MaxValue) 309return int.MaxValue;
System\Windows\Integration\ElementHost.cs (2)
108if (constraints.Width == Int32.MaxValue) { constraints.Width = Double.PositiveInfinity; } 109if (constraints.Height == Int32.MaxValue) { constraints.Height = Double.PositiveInfinity; }
System\Windows\Integration\HostUtils.cs (6)
43if (size.Width == 0) { size.Width = int.MaxValue; } 44if (size.Height == 0) { size.Height = int.MaxValue; } 51if (size.Width == 0 || size.Width == 1) { size.Width = int.MaxValue; } 52if (size.Height == 0 || size.Height == 1) { size.Height = int.MaxValue; } 58if (size.Width == int.MaxValue) 62if (size.Height == int.MaxValue)
WinFormsControlsTest (3)
TrackBars.cs (3)
75numericFrequency.Maximum = (int)Math.Min(numericMaximum.Value - numericMaximum.Minimum, int.MaxValue); 86trackBar1.Maximum = (int)Math.Min(numericMaximum.Value, int.MaxValue); 88numericFrequency.Maximum = (int)Math.Min(numericMaximum.Value - numericMaximum.Minimum, int.MaxValue);