2431 references to MaxValue
aspire (3)
Backchannel\AppHostConnectionHelper.cs (1)
88.ThenBy(c => c.AppHostInfo?.ProcessId ?? int.MaxValue)
Commands\LogsCommand.cs (1)
299var logEntries = new LogEntries(int.MaxValue) { BaseLineNumber = 1 };
Utils\EmojiWidth.cs (1)
52return ((IRenderable)renderable).Measure(options, int.MaxValue).Max;
Aspire.Cli.Tests (3)
Utils\AppHostHelperTests.cs (2)
187var invalidPid = int.MaxValue - 1; 324var deadPid = int.MaxValue - 1;
Utils\CliTestHelper.cs (1)
290console.Profile.Width = int.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 (22)
Components\Pages\StructuredLogs.razor.cs (3)
239builder.StructuredLogs(context, application, ViewModel.GetLogs, ViewModel.HasErrors(), () => ViewModel.GetErrorLogs(int.MaxValue)); 243builder.StructuredLogs(context, ViewModel.GetLogs, ViewModel.HasErrors(), () => ViewModel.GetErrorLogs(int.MaxValue)); 347() => ViewModel.GetErrorLogs(count: int.MaxValue)));
Components\Pages\Traces.razor.cs (3)
416() => TracesViewModel.GetErrorTraces(count: int.MaxValue))); 484builder.Traces(context, resource, TracesViewModel.GetTraces, TracesViewModel.HasErrors(), () => TracesViewModel.GetErrorTraces(int.MaxValue)); 488builder.Traces(context, TracesViewModel.GetTraces, TracesViewModel.HasErrors(), () => TracesViewModel.GetErrorTraces(int.MaxValue));
Configuration\DashboardOptions.cs (2)
361public int MaxAttributeLength { get; set; } = int.MaxValue; 362public int MaxSpanEventCount { get; set; } = int.MaxValue;
Mcp\AspireTelemetryMcpTools.cs (3)
61Count = int.MaxValue, 111Count = int.MaxValue, 162Count = int.MaxValue,
Model\Assistant\AssistantChatDataContext.cs (3)
130Count = int.MaxValue, 173Count = int.MaxValue, 210Count = int.MaxValue,
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
600Count = int.MaxValue,
Model\KnownPropertyLookup.cs (1)
88return (int.MaxValue, null);
Otlp\Storage\GetLogsContext.cs (1)
19Count = int.MaxValue,
Otlp\Storage\GetTracesRequest.cs (1)
20Count = int.MaxValue,
Otlp\Storage\TelemetryRepository.cs (2)
490Count = int.MaxValue, 521Count = int.MaxValue,
Utils\DashboardUIHelpers.cs (2)
116if (milliseconds >= int.MaxValue) 118return int.MaxValue;
Aspire.Dashboard.Components.Tests (1)
tests\Aspire.Dashboard.Tests\Model\MockKnownPropertyLookup.cs (1)
10private int _priority = int.MaxValue;
Aspire.Dashboard.Tests (12)
ConsoleLogsTests\LogEntriesTests.cs (1)
13var logEntries = new LogEntries(maximumEntryCount: maximumEntryCount ?? int.MaxValue);
DashboardOptionsTests.cs (3)
178options.ResourceServiceClient.ClientCertificate.Source = (DashboardClientCertificateSource)int.MaxValue; 204options.ResourceServiceClient.AuthMode = (ResourceClientAuthMode)int.MaxValue; 209Assert.Equal($"Unexpected resource service client authentication mode: {int.MaxValue}", result.FailureMessage);
DashboardUIHelpersTests.cs (5)
34var duration = TimeSpan.FromMilliseconds((double)int.MaxValue + 1000); 40Assert.Equal(int.MaxValue, result); 47var duration = TimeSpan.FromMilliseconds(int.MaxValue); 53Assert.Equal(int.MaxValue, result); 80Assert.Equal(int.MaxValue, result);
Model\MockKnownPropertyLookup.cs (1)
10private int _priority = int.MaxValue;
Model\TelemetryExportServiceTests.cs (2)
56Count = int.MaxValue, 289Count = int.MaxValue,
Aspire.Hosting (3)
Dcp\DcpPipelineBuilder.cs (1)
70MaxRetryAttempts = int.MaxValue,
Dcp\KubernetesService.cs (2)
421MaxRetryAttempts = int.MaxValue, 517MaxRetryAttempts = int.MaxValue,
Aspire.Hosting.Oracle.Tests (3)
OracleFunctionalTests.cs (3)
85MaxRetryAttempts = int.MaxValue, 259MaxRetryAttempts = int.MaxValue, 357MaxRetryAttempts = int.MaxValue,
Aspire.Hosting.SqlServer.Tests (2)
SqlServerFunctionalTests.cs (2)
66.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 (4)
Dcp\DcpExecutorTests.cs (1)
2603MaxRetryAttempts = int.MaxValue,
Helpers\Network.cs (1)
40MaxRetryAttempts = int.MaxValue,
InteractionServiceTests.cs (1)
526[InlineData(int.MaxValue, false)]
Utils\PasswordGeneratorTests.cs (1)
37Assert.Throws<OverflowException>(() => Generate(10, true, true, true, true, int.MaxValue, 1, 0, 0));
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)
Contract.Message.IntegrationTests (1)
MessageContractCommon.4.1.0.cs (1)
153MessageBuffer buffer = reply.CreateBufferedCopy(int.MaxValue);
dotnet (7)
Commands\Test\MTP\Terminal\AnsiTerminal.cs (2)
48=> _console.IsOutputRedirected ? int.MaxValue : _console.BufferWidth; 51=> _console.IsOutputRedirected ? int.MaxValue : _console.BufferHeight;
Commands\Test\MTP\Terminal\SimpleTerminalBase.cs (2)
19public int Width => Console.IsOutputRedirected ? int.MaxValue : Console.BufferWidth; 21public int Height => Console.IsOutputRedirected ? int.MaxValue : Console.BufferHeight;
Parser.cs (2)
298private DotnetHelpBuilder(int maxWidth = int.MaxValue) : base(maxWidth) { } 309windowWidth = int.MaxValue;
PrintableTable.cs (1)
24public void AddColumn(string header, Func<T, string> getContent, int maxWidth = int.MaxValue)
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (1)
638return int.MaxValue;
dotnet-svcutil-lib (140)
FrameworkFork\Microsoft.CodeDom\Microsoft\VBCodeProvider.cs (1)
3313if (fileLength > Int32.MaxValue)
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)
462return int.MaxValue; 467return int.MaxValue;
Metadata\ServiceDescriptor.cs (1)
123new MaxMessageSizeStream(stream, int.MaxValue),
Extensibility.MessageEncoder.IntegrationTests (1)
CustomTextMessageEncoder.cs (1)
67return ReadMessage(stream, int.MaxValue);
GenerateDocumentationAndConfigFiles (37)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (2)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
96AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
ILAssembler (2)
VTableExportPEBuilder.cs (2)
494int baseOrdinal = int.MaxValue; 501if (baseOrdinal == int.MaxValue) baseOrdinal = 1;
ILCompiler.Compiler (3)
Compiler\TypePreinit.cs (2)
1819|| sizeBytes > int.MaxValue /* paranoid check that cast to int is legit */) 2023if (longValue < int.MinValue || longValue > int.MaxValue)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (1)
17public int CustomSort = int.MaxValue;
ILCompiler.ReadyToRun (6)
Compiler\FileLayoutOptimizer.cs (2)
126if (sortableNode.CustomSort != Int32.MaxValue) 215order[methods[i]] = int.MaxValue;
Compiler\ReadyToRunTableManager.cs (2)
119((x is SortableDependencyNode sortableX && sortableX.CustomSort != Int32.MaxValue) || 120(y is SortableDependencyNode sortableY && sortableY.CustomSort != Int32.MaxValue)));
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (1)
17public int CustomSort = int.MaxValue;
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (1)
428ArgumentOutOfRangeException.ThrowIfGreaterThan(value, int.MaxValue);
ILCompiler.RyuJit (3)
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\Compiler\FileLayoutOptimizer.cs (2)
126if (sortableNode.CustomSort != Int32.MaxValue) 215order[methods[i]] = int.MaxValue;
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (1)
428ArgumentOutOfRangeException.ThrowIfGreaterThan(value, int.MaxValue);
ILCompiler.TypeSystem (3)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldLayoutAlgorithm.cs (1)
85public static readonly LayoutInt InvalidOffset = new LayoutInt(int.MaxValue);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (1)
339int bestInterfaceIndex = int.MaxValue;
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameParser.cs (1)
16private static readonly TypeNameParseOptions s_typeNameParseOptions = new() { MaxNodes = int.MaxValue };
illink (1)
ILLink.RoslynAnalyzer (2)
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
442/// this instance exceed <see cref="int.MaxValue"/>.</exception>
TrimAnalysis\TypeNameResolver.cs (1)
19static readonly TypeNameParseOptions s_typeNameParseOptions = new() { MaxNodes = 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.Forms (1)
ClientValidation\DefaultClientValidationService.cs (1)
80if (sla.MaximumLength != int.MaxValue)
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingOptions.cs (1)
31[Range(0, int.MaxValue)]
Microsoft.AspNetCore.HttpLogging (1)
BufferingStream.cs (1)
181private static int GetSegmentSize(int sizeHint, int maxBufferSize = int.MaxValue)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
50var apiConventionedAttributes = apiConventionResult.ResponseMetadataProviders.Select(x => new ApiResponseMetadataProviderWithScope(x, scope: 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.DataAnnotations (1)
StringLengthAttributeAdapter.cs (1)
31if (Attribute.MaximumLength != 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.OpenApi.SourceGenerators (1)
Helpers\StringExtensions.cs (1)
25var minLeadingWhitespace = int.MaxValue;
Microsoft.AspNetCore.OutputCaching (1)
RecyclableArrayBufferWriter.cs (1)
103if ((uint)newSize > int.MaxValue)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
ReadWriterLocker.cs (1)
24private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue);
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionProvider.cs (1)
135candidates.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)
139var order = isFallback ? int.MaxValue : 0;
ShortCircuit\RouteShortCircuitEndpointRouteBuilderExtensions.cs (1)
42((RouteEndpointBuilder)endpoint).Order = int.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Core (11)
Internal\Http2\Http2Connection.cs (3)
203(int)Math.Min(MaxTrackedStreams, int.MaxValue), 256_frameWriter.WriteGoAwayAsync(int.MaxValue, errorCode).Preserve(); 1541_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\aspnetcore\src\Shared\Hpack\DynamicHPackEncoder.cs (1)
32Head.Initialize(-1, string.Empty, string.Empty, 0, int.MaxValue, null);
src\aspnetcore\src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
25public const uint MaxWindowSize = int.MaxValue;
Systemd\KestrelServerOptionsSystemdExtensions.cs (1)
44&& listenFds <= int.MaxValue - SdListenFdsStart)
Microsoft.Build (12)
BackEnd\Components\Caching\ConfigCache.cs (1)
188int smallestId = int.MaxValue;
Collections\RetrievableEntryHashSet\HashHelpers.cs (1)
71for (int i = (min | 1); i < Int32.MaxValue; i += 2)
Evaluation\Expander\ArgumentParser.cs (2)
181if (d >= int.MinValue && d <= int.MaxValue) 192if (l >= int.MinValue && l <= int.MaxValue)
Evaluation\ExpressionShredder.cs (1)
119currentIndex = int.MaxValue;
Graph\ParallelWorkSet.cs (1)
91_semaphore = new SemaphoreSlim(0, int.MaxValue);
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
260if (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)
272if (fileStream.Length > int.MaxValue)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
Microsoft.Build.Framework (3)
NativeMethods.cs (1)
290_maxPath = isMaxPathRestricted ? MAX_PATH : int.MaxValue;
Utilities\ProcessExtensions.cs (1)
157private static string ParseNullSeparatedArguments(ReadOnlySpan<byte> data, int maxArgs = int.MaxValue)
Utilities\QuotingUtilities.cs (1)
168return SplitUnquoted(input, int.MaxValue, false /* discard empty splits */, false /* don't unquote the split pieces */, out emptySplits, separator);
Microsoft.Build.Tasks.Core (5)
AssemblyDependency\TaskItemSpecFilenameComparer.cs (1)
74int.MaxValue, // all characters after the start index
RedistList.cs (3)
502_index = simpleNameMap.TryGetValue(simpleName, out int index) ? index : int.MaxValue; 509_index = int.MaxValue; 521_index = int.MaxValue;
src\msbuild\src\Shared\LanguageParser\StreamMappedString.cs (1)
41private int _finalPageNumber = Int32.MaxValue;
Microsoft.Build.Tasks.Git (7)
GitDataReader\GitRefTableReader.Primitives.cs (1)
50if (result > int.MaxValue)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.Build.Utilities.Core (1)
ToolTask.cs (1)
1123proc.WaitForExit(int.MaxValue);
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)
1031if (xOrdinal == 0) xOrdinal = int.MaxValue; 1032if (yOrdinal == 0) yOrdinal = int.MaxValue; 1041Debug.Assert(xOrdinal == int.MaxValue && yOrdinal == int.MaxValue); 1044xOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(x.parentHandle, out var rowIds) ? rowIds[0] : int.MaxValue; 1045yOrdinal = _previousGeneration.CustomAttributesAdded.TryGetValue(y.parentHandle, out rowIds) ? rowIds[0] : int.MaxValue; 1054Debug.Assert(xOrdinal == int.MaxValue && yOrdinal == int.MaxValue);
EnumConstantHelper.cs (1)
73overflowKind = CheckOverflow(int.MaxValue, previous, offset);
Generated\Operations.Generated.cs (101)
4078case int.MaxValue: 4133case int.MaxValue: 4200case int.MaxValue: 4300case int.MaxValue: 4390case int.MaxValue: 4498case int.MaxValue: 4592case int.MaxValue: 4678case int.MaxValue: 4739case int.MaxValue: 4813case int.MaxValue: 4886case int.MaxValue: 4940case int.MaxValue: 5001case int.MaxValue: 5093case int.MaxValue: 5176case int.MaxValue: 5244case int.MaxValue: 5311case int.MaxValue: 5422case int.MaxValue: 5478case int.MaxValue: 5542case int.MaxValue: 5601case int.MaxValue: 5664case int.MaxValue: 5739case int.MaxValue: 5813case int.MaxValue: 5883case int.MaxValue: 5939case int.MaxValue: 6004case int.MaxValue: 6061case int.MaxValue: 6123case int.MaxValue: 6203case int.MaxValue: 6255case int.MaxValue: 6325case int.MaxValue: 6400case int.MaxValue: 6456case int.MaxValue: 6518case int.MaxValue: 6581case int.MaxValue: 6656case int.MaxValue: 6712case int.MaxValue: 6768case int.MaxValue: 6830case int.MaxValue: 6886case int.MaxValue: 6942case int.MaxValue: 7002case int.MaxValue: 7054case int.MaxValue: 7106case int.MaxValue: 7215case int.MaxValue: 7275case int.MaxValue: 7341case int.MaxValue: 7393case int.MaxValue: 7449case int.MaxValue: 7504case int.MaxValue: 7583case int.MaxValue: 7630case int.MaxValue: 7681case int.MaxValue: 7732case int.MaxValue: 7785case int.MaxValue: 7850case int.MaxValue: 7926case int.MaxValue: 7997case int.MaxValue: 8068case int.MaxValue: 8141case int.MaxValue: 8232case int.MaxValue: 8294case int.MaxValue: 8350case int.MaxValue: 8401case int.MaxValue: 8457case int.MaxValue: 8524case int.MaxValue: 8592case int.MaxValue: 8676case int.MaxValue: 8743case int.MaxValue: 8811case int.MaxValue: 8889case int.MaxValue: 8964case int.MaxValue: 9056case int.MaxValue: 9123case int.MaxValue: 9181case int.MaxValue: 9244case int.MaxValue: 9318case int.MaxValue: 9403case int.MaxValue: 9477case int.MaxValue: 9542case int.MaxValue: 9605case int.MaxValue: 9669case int.MaxValue: 9724case int.MaxValue: 9802case int.MaxValue: 9860case int.MaxValue: 9911case int.MaxValue: 9972case int.MaxValue: 10046case int.MaxValue: 10108case int.MaxValue: 10175case int.MaxValue: 10237case int.MaxValue: 10292case int.MaxValue: 10374case int.MaxValue: 10438case int.MaxValue: 10493case int.MaxValue: 10557case int.MaxValue: 10630case int.MaxValue: 10690case int.MaxValue: 10759case int.MaxValue: 10822case int.MaxValue:
InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal 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)
98_currentSlot = int.MaxValue; 99_currentIndex = int.MaxValue; 106Debug.Assert(_operation != null && _currentSlot is >= 0 and not int.MaxValue && _currentIndex is >= 0 and not int.MaxValue); 113Debug.Assert((_currentSlot == int.MaxValue) == (_currentIndex == int.MaxValue)); 120_currentIndex = int.MaxValue; 121_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\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
Symbols\CommonGeneratedNameParser.cs (1)
39if (value > int.MaxValue)
Syntax\InternalSyntax\SyntaxListBuilder.cs (2)
144requiredSize >= (int.MaxValue / 2) ? int.MaxValue :
Syntax\InternalSyntax\SyntaxNodeCache.cs (4)
291return code & Int32.MaxValue; 308return code & Int32.MaxValue; 329return code & Int32.MaxValue; 358return 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)
103var start = int.MaxValue;
Microsoft.CodeAnalysis.Analyzers (38)
MetaAnalyzers\ReleaseTrackingHelper.cs (2)
42internal static Version UnshippedVersion { get; } = new Version(int.MaxValue, int.MaxValue);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
93if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
96AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
Microsoft.CodeAnalysis.AnalyzerUtilities (32)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
93if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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)
Microsoft.CodeAnalysis.CodeStyle (34)
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
46var fileHeaderStart = int.MaxValue;
src\roslyn\src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
30var currentOrder = preferredOrder.TryGetValue(modifier.RawKind, out var value) ? value : int.MaxValue;
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
93if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
62return int.MaxValue; 76return distance == int.MaxValue ? distance : distance + 1;
src\roslyn\src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
77=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
96AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
Microsoft.CodeAnalysis.CSharp (37)
Binder\Binder_Conversions.cs (4)
4317case SpecialType.System_Int32: return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 4323return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 4347case SpecialType.System_Int32: return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M); 4351return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M);
Binder\Binder_Operators.cs (2)
3196/// Returns ConstantValue.Bad if, and only if, the resulting string length exceeds <see cref="int.MaxValue"/>. 3209return (newLength > int.MaxValue) ? ConstantValue.Bad : ConstantValue.CreateFromRope(Rope.Concat(leftValue, rightValue));
Binder\DecisionDagBuilder.cs (3)
3524IConstantValueSet possibleValues = fac.Related(BinaryOperatorKind.LessThanOrEqual, int.MaxValue - offset); 3540return ConstantValue.Create(offset > (int.MaxValue - value) ? int.MaxValue : value + offset);
Binder\PatternExplainer.cs (1)
815if (remainingValues.Any(BinaryOperatorKind.GreaterThan, ConstantValue.Create(int.MaxValue)))
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1772BoundLiteral intMaxValueLiteral = new BoundLiteral(syntaxNode, ConstantValue.Create(int.MaxValue), expectedAttributeType);
BoundTree\LengthBasedStringSwitchData.cs (1)
210int bestIndexLargestBucket = int.MaxValue;
LanguageVersion.cs (3)
273LatestMajor = int.MaxValue - 2, 278Preview = int.MaxValue - 1, 283Latest = int.MaxValue,
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2371if (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)
1072if (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)
554int 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)
113if (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\roslyn\src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
52=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
758var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length;
Microsoft.CodeAnalysis.CSharp.Features (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
52=> preferredOrder.TryGetValue(token.RawKind, out var value) ? value : int.MaxValue;
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.cs (1)
63for (int i = 1; i < int.MaxValue; i++)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.IdentifierGenerator.cs (1)
40if (_nextIdentifier is null or int.MaxValue)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
758var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length;
Microsoft.CodeAnalysis.Extensions.Package (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
Microsoft.CodeAnalysis.Features (12)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
90document, fixes, packageInstallerService, maxResults: int.MaxValue);
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)
157index1 = index1 < 0 ? int.MaxValue : index1; 158index2 = index2 < 0 ? int.MaxValue : index2;
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
46var fileHeaderStart = int.MaxValue;
src\roslyn\src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
30var currentOrder = preferredOrder.TryGetValue(modifier.RawKind, out var value) ? value : int.MaxValue;
src\roslyn\src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (2)
62return int.MaxValue; 76return distance == int.MaxValue ? distance : distance + 1;
src\roslyn\src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
77=> 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.Razor.Compiler (3)
Language\Extensions\EliminateMethodBodyPass.cs (1)
13public override int Order => int.MaxValue;
Language\Syntax\InternalSyntax\SyntaxListBuilder.cs (2)
147requiredSize >= (int.MaxValue / 2) ? int.MaxValue :
Microsoft.CodeAnalysis.ResxSourceGenerator (32)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
93if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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)
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)
45maximumLineLength: int.MaxValue,
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
214var formatted = bound is >= int.MinValue and <= int.MaxValue
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.Workspaces (40)
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
257? int.MaxValue
Log\StatisticResult.cs (1)
22var min = int.MaxValue;
Rename\ConflictEngine\ConflictResolver.cs (1)
413.ThenBy(l => l.IsInSource ? l.SourceSpan.Start : int.MaxValue);
Serialization\SerializerService_Reference.cs (1)
26private const int MetadataFailed = int.MaxValue;
Shared\Utilities\DocumentationComment.cs (2)
194var maxPrefix = int.MaxValue; 210if (maxPrefix == int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
96AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
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.Deployment.DotNet.Releases (2)
ReleaseVersion.cs (2)
665/// <exception cref="ArgumentOutOfRangeException">If the major, minor, or patch version exceeds <see cref="int.MaxValue"/>.</exception> 810/// <exception cref="OverflowException">If <paramref name="throwOnFailure"/> is <see langword="true"/> and the value exceeds <see cref="int.MaxValue"/>.</exception>
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\ConditionalWeakTable_1.cs (1)
69hashCode &= int.MaxValue;
Microsoft.Diagnostics.DataContractReader.Legacy (2)
ConversionExtensions.cs (2)
58if (!overrideCheck && (signedAddr > int.MaxValue || signedAddr < int.MinValue)) 78if (signedAddr > int.MaxValue || signedAddr < int.MinValue)
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsIpc\IpcTransport.cs (1)
117await namedPipe.ConnectAsync(int.MaxValue, token).ConfigureAwait(false);
Microsoft.DiaSymReader (2)
Extensions\SymUnmanagedExtensions.Document.cs (2)
112Marshal.ThrowExceptionForHR(document.GetSourceRange(0, 0, int.MaxValue, int.MaxValue, length, out int bytesRead, blob));
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.Cli.Definitions (2)
Help\HelpBuilder.cs (2)
22public HelpBuilder(int maxWidth = int.MaxValue) 26maxWidth = int.MaxValue;
Microsoft.DotNet.Cli.Utils (1)
PathUtility.cs (1)
84public static bool DeleteFileAndEmptyParents(string path, int maxDirectoriesToDelete = int.MaxValue)
Microsoft.DotNet.TemplateLocator (2)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (1)
467return int.MaxValue;
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.cs (1)
114if (reader.TryGetInt64(out var intVersion) && intVersion < int.MaxValue)
Microsoft.Extensions.AI.Abstractions (1)
Contents\DataContent.cs (1)
188MemoryStream memoryStream = stream.CanSeek ? new((int)Math.Min(stream.Length, int.MaxValue)) : new();
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
433IntEnum = (IntEnum)int.MaxValue, 437StringEnumUsingIntConverter = (StringEnum)int.MaxValue,
Microsoft.Extensions.AI.Evaluation.NLP (1)
Common\BLEUAlgorithm.cs (1)
27int smallestDiff = int.MaxValue;
Microsoft.Extensions.Caching.Hybrid (4)
Internal\HybridCachePayload.cs (3)
216if (!TryRead7BitEncodedInt64(ref bytes, out u64) || u64 > int.MaxValue) // payload length 236if (!TryRead7BitEncodedInt64(ref bytes, out u64) || u64 > int.MaxValue) // tag count 335|| 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)
1030Assert.InRange(int.Parse(actualValue), 0, int.MaxValue);
Microsoft.Extensions.ServiceDiscovery.Dns (2)
DnsResolverOptionsValidator.cs (1)
12private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue);
Resolver\DnsResolver.cs (1)
556int ttl = int.MaxValue;
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
ServiceDiscoveryDnsServiceCollectionExtensionsTests.cs (1)
84services.ConfigureDnsResolver(options => options.Timeout = TimeSpan.FromMilliseconds(1L + int.MaxValue));
Microsoft.Extensions.Telemetry (2)
Sampling\RandomProbabilisticSampler.cs (2)
54return _randomInstance.Value!.Next(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)
81public 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)
577return index < 0 ? 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)
544ExceptionContext.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 (54)
EncodeSettings.cs (1)
15public EncodeSettings() { MaxTokenCount = int.MaxValue; }
Model\BPETokenizer.cs (1)
637private 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)
SentencepieceModel.cs (1)
310ms = remaining > 0 && remaining <= int.MaxValue ? new MemoryStream((int)remaining) : new MemoryStream();
Tokenizer.cs (3)
232settings.MaxTokenCount = int.MaxValue; 398if (newSize > int.MaxValue) 401if (newSize > int.MaxValue)
Utils\BytePairEncoder.cs (14)
41byteIndicesAndRanks[i] = (i, int.MaxValue); 55return int.MaxValue; 61if (rank != int.MaxValue) 69var minRank = (Index: 0, Rank: int.MaxValue); 78if (minRank.Rank != int.MaxValue) 164Prev = int.MaxValue, 167NextRank = int.MaxValue, 168CurRank = int.MaxValue 187NextRank = int.MaxValue, 188CurRank = int.MaxValue 196stateSpan[start].NextRank = int.MaxValue; 213if (left.Rank == int.MaxValue) 243state[rightStart].NextRank = int.MaxValue; 274int tokenId = state[currentIndex].CurRank != 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.Build.Tasks (3)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (1)
467return int.MaxValue;
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.cs (1)
114if (reader.TryGetInt64(out var intVersion) && intVersion < int.MaxValue)
src\sdk\src\Tasks\Common\ConflictResolution\PackageRank.cs (1)
42return int.MaxValue;
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\Kudu\KuduDeploy.cs (1)
168string zipFileFullPath = Path.Combine(Path.GetTempPath(), string.Format("Publish{0}.zip", new Random().Next(int.MaxValue)));
Microsoft.NET.Sdk.WorkloadManifestReader (2)
SdkDirectoryWorkloadManifestProvider.cs (1)
467return int.MaxValue;
WorkloadManifestReader.cs (1)
114if (reader.TryGetInt64(out var intVersion) && intVersion < int.MaxValue)
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
114if (Interlocked.CompareExchange(ref _scavengeThreshold, int.MaxValue, scavengeThreshold) == scavengeThreshold)
Microsoft.Private.Windows.Core (1)
src\winforms\src\Microsoft.Private.Windows.Polyfills\system\NativeIntExtensions.cs (1)
20? unchecked((nint)(Int32.MaxValue))
Microsoft.SourceLink.AzureDevOpsServer.Git (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.AzureRepos.Git (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Bitbucket.Git (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Common (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Gitea (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Gitee (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitHub (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitLab (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitWeb (6)
src\sourcelink\src\Common\Utilities\Hash.cs (6)
44internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 89internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 113internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 139internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 164internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.TemplateEngine.Cli (2)
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (1)
117includeAllParentDirectories ? int.MaxValue : 1,
TabularOutput\TabularOutput.cs (1)
330MaxWidth = maxWidth > 0 ? maxWidth : int.MaxValue;
Microsoft.TemplateEngine.Core (4)
Matching\TrieEvaluator.cs (2)
160int minNonTerminatedPathStart = int.MaxValue; 161int minTerminalStart = int.MaxValue;
Operations\InlineMarkupConditional.cs (1)
108IProcessorState localState = new ProcessorState(new MemoryStream(condition), new MemoryStream(), conditionBytes.Count, int.MaxValue, adjustedConfig, []);
Util\TokenTrie.cs (1)
18public int MinLength { get; private set; } = int.MaxValue;
Microsoft.TestPlatform.CommunicationUtilities (1)
JsonDataSerializer.Stj.cs (1)
169if (dict[key] is double d && d == Math.Truncate(d) && d is >= int.MinValue and <= int.MaxValue)
Microsoft.TestPlatform.CrossPlatEngine (2)
Execution\TestRunCache.cs (2)
87if (cacheTimeout.TotalMilliseconds > int.MaxValue) 89cacheTimeout = TimeSpan.FromMilliseconds(int.MaxValue / 2);
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.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
ObjectModel\TestElement.cs (1)
23protected const int DefaultPriority = int.MaxValue;
Utility\Converter.cs (1)
561int priority = int.MaxValue;
Microsoft.VisualStudio.TestPlatform.ObjectModel (5)
Navigation\FullSymbolReader.cs (1)
170DiaNavigationData navigationData = new(null, int.MaxValue, int.MinValue);
Navigation\PortablePdbReader.cs (1)
127minLineNumber = int.MaxValue;
Nuget.Frameworks\FrameworkConstants.cs (1)
12public static readonly Version MaxVersion = new(int.MaxValue, 0, 0, 0);
Nuget.Frameworks\FrameworkNameProvider.cs (2)
1031xIndex = int.MaxValue; 1037yIndex = int.MaxValue;
Microsoft.Win32.Registry (1)
Microsoft\Win32\RegistryKey.cs (1)
1103if (dataLength == int.MaxValue)
Mono.Cecil.Rocks (1)
Mono.Cecil.Rocks\MethodBodyRocks.cs (1)
193 if (l >= int.MaxValue || l <= int.MinValue)
MSBuild (2)
CommandLine\CommandLineSwitches.cs (1)
554_parameterizedSwitches[(int)parameterizedSwitch].parameters.AddRange(QuotingUtilities.SplitUnquoted(switchParameters, int.MaxValue, false /* discard empty parameters */, unquoteParameters, out emptyParameters, s_parameterSeparators));
XMake.cs (1)
3927var loggerTypeSpec = QuotingUtilities.SplitUnquoted(loggerSpec[0], int.MaxValue, true /* keep empty splits */, false /* keep quotes */, out _, ',');
NuGet.DependencyResolver.Core (13)
Remote\RemoteDependencyWalker.cs (13)
528return new NuGetVersion(int.MaxValue, int.MaxValue, int.MaxValue); 532return new NuGetVersion(versionRange.MinVersion.Major, int.MaxValue, int.MaxValue, int.MaxValue); 536return new NuGetVersion(versionRange.MinVersion.Major, versionRange.MinVersion.Minor, int.MaxValue, int.MaxValue); 544int.MaxValue); 548return new NuGetVersion(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue);
NuGet.Frameworks (3)
FrameworkConstants.cs (1)
11public static readonly Version MaxVersion = new Version(int.MaxValue, 0, 0, 0);
FrameworkNameProvider.cs (2)
1043xIndex = int.MaxValue; 1049yIndex = int.MaxValue;
NuGet.Protocol (2)
LocalRepositories\LocalPackageListResource.cs (1)
119_searchTerm, _filter, 0, int.MaxValue, _logger, _token);
Plugins\ProtocolConstants.cs (1)
35public static readonly TimeSpan MaxTimeout = TimeSpan.FromMilliseconds(int.MaxValue);
NuGet.Versioning (1)
NuGetVersionFactory.cs (1)
211if (intermediateVersionNumber > 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\wpf\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)
606if (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)
1981private 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)
432int 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\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\ItemMap.cs (1)
65int keyPv = Int32.MaxValue;
System\Windows\Annotations\AnnotationService.cs (2)
721AdornerPresentationContext.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)
927extData.CellGroup1 = int.MaxValue; 928extData.CellGroup2 = int.MaxValue; 929extData.CellGroup3 = int.MaxValue; 930extData.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); 12015_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)
1110else if (value > Int32.MaxValue) 1112i = Int32.MaxValue; 1279internal 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)
1814else if (value > Int32.MaxValue) 1816i = Int32.MaxValue;
System\Windows\Documents\List.cs (1)
202if (itemIndex < int.MaxValue)
System\Windows\Documents\Speller.cs (1)
1235leftWordBreak = 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)
5672((l > Int32.MaxValue) || (l < Int32.MinValue))) 5688if ((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)
813return (int)Math.Max(0, Math.Min(value, int.MaxValue)); 818return (int)Math.Min(value, int.MaxValue);
Roslyn.Diagnostics.Analyzers (37)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\EncodingExtensions.cs (1)
16if (length <= int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
51internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue) 77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue) 96internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue) 120internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue) 146internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue) 171internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Internal\HashHelpers.cs (2)
74for (var i = (min | 1); i < int.MaxValue; i += 2) 113Debug.Assert(divisor <= int.MaxValue);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
93if ((schedulerMax > 0) && (schedulerMax != int.MaxValue))
src\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
26/// <para>The <paramref name="delay"/> argument's <see cref="TimeSpan.TotalMilliseconds"/> property is greater than <see cref="int.MaxValue"/>.</para>
src\roslyn\src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringContextExtensions.cs (1)
59text, root, span, allowEmptyNodes: false, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
472public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
119if (start == int.MinValue && end == int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.Enumerator.cs (1)
30private NodeEnumerator<AlwaysThrowIntrospector> _nodeEnumerator = new(tree, start: int.MinValue, end: int.MaxValue, default);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
26var start = int.MaxValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionGroup.cs (2)
10internal sealed class OptionGroup(string name, string description, int priority = int.MaxValue, OptionGroup? parent = null) 12public static readonly OptionGroup Default = new(string.Empty, string.Empty, int.MaxValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
96return int.MaxValue; 169if (ordinal != int.MaxValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (1)
122edgesExist ? int.MaxValue : threshold);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
59{ int.MaxValue, nameof(int.MaxValue) },
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
96AddRelevantNodes(document, span, allowEmptyNodes, maxCount: int.MaxValue, ref result.AsRef(), cancellationToken);
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
758var maxParameterCount = parameterList.Any(p => p.IsParams) ? int.MaxValue : parameterList.Length;
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)
433IntEnum = (IntEnum)int.MaxValue, 437StringEnumUsingIntConverter = (StringEnum)int.MaxValue,
System.Collections (2)
src\runtime\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 (12)
src\runtime\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> 1700if ((totalMilliseconds < 0 || totalMilliseconds > int.MaxValue) && (totalMilliseconds != Timeout.Infinite)) 1703SR.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue)); 1717SR.Format(CultureInfo.InvariantCulture, SR.BlockingCollection_TimeoutInvalid, int.MaxValue));
System\Collections\Concurrent\ConcurrentBag.cs (2)
664int.MaxValue; // in debug builds, start at the end so we exercise the index reset logic 728if (tail == int.MaxValue)
System.Collections.Immutable (4)
src\runtime\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)
215int minLength = int.MaxValue, maxLength = 0;
System\Collections\Frozen\FrozenSet.cs (1)
146int minLength = int.MaxValue, maxLength = 0;
System.CommandLine (4)
Help\HelpAction.cs (2)
25_maxWidth = Console.IsOutputRedirected ? int.MaxValue : Console.WindowWidth; 29_maxWidth = int.MaxValue;
Help\HelpBuilder.cs (2)
22public HelpBuilder(int maxWidth = int.MaxValue) 26maxWidth = int.MaxValue;
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 ((ulong)dataIndex > int.MaxValue) 187if ((ulong)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.Data.OleDb (7)
OleDbDataReader.cs (3)
537info.size = (((maxsize < 0) || (int.MaxValue < maxsize)) ? int.MaxValue : (int)maxsize); 835if (dataIndex > int.MaxValue)
OleDbParameter.cs (3)
344size = int.MaxValue; 348size = int.MaxValue / 2; 352size = int.MaxValue;
System\Data\Common\AdapterUtil.cs (1)
1269lval = Math.Min((long)int.MaxValue, lval);
System.Diagnostics.PerformanceCounter (3)
System\Diagnostics\PerformanceDataRegistryKey.cs (3)
66if (size == int.MaxValue) 73else if (size > (int.MaxValue / 2)) 76size = int.MaxValue;
System.Diagnostics.Process (7)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (2)
193/// or is greater than <see cref="int.MaxValue"/> milliseconds.</exception> 214/// or is greater than <see cref="int.MaxValue"/> milliseconds.</exception>
System\Diagnostics\Process.cs (1)
713return WaitForInputIdle(int.MaxValue);
System\Diagnostics\Process.Linux.cs (2)
197if (rsslim > int.MaxValue) 198rsslim = int.MaxValue;
System\Diagnostics\Process.Multiplexing.cs (1)
696remainingTimeoutMs = (int)Math.Min(remaining, int.MaxValue);
System\Diagnostics\ProcessUtils.cs (1)
55ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System.DirectoryServices (4)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (1)
314if (tmpVal > int.MaxValue)
System\DirectoryServices\DirectorySearcher.cs (3)
177if (value.TotalSeconds > int.MaxValue) 290if (value.TotalSeconds > int.MaxValue) 309if (value.TotalSeconds > int.MaxValue)
System.DirectoryServices.Protocols (5)
System\DirectoryServices\Protocols\common\DirectoryRequest.cs (1)
303if (value.TotalSeconds > int.MaxValue)
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (1)
113if (value.TotalSeconds > int.MaxValue)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (3)
226if (value.TotalSeconds > int.MaxValue) 265if (value.TotalMilliseconds > int.MaxValue) 407if (value.TotalSeconds > int.MaxValue)
System.Drawing.Common (2)
System\Drawing\Icon.cs (2)
514if (_bestImageOffset > int.MaxValue) 519if (_bestBytesInRes > int.MaxValue)
System.Formats.Asn1 (6)
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 (3)
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 833/// <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 (2)
System\IO\Compression\ZipArchiveEntry.cs (1)
995if (_compressedSize > int.MaxValue)
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
223if (frameContentSize == ZSTD_CONTENTSIZE_UNKNOWN || frameContentSize == ZSTD_CONTENTSIZE_ERROR || frameContentSize > 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)
618ArgumentOutOfRangeException.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)
212ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
System\IO\Pipes\NamedPipeServerStream.Unix.cs (2)
45(maxNumberOfServerInstances == MaxAllowedServerInstances) ? int.MaxValue : maxNumberOfServerInstances, options); 347socket.Listen(int.MaxValue);
System.IO.Ports (1)
System\IO\Ports\SerialPort.cs (1)
1345return (elapsedTime >= 0) ? (int)elapsedTime : int.MaxValue;
System.Linq (13)
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)
15if (count < 0 || max > int.MaxValue)
System\Linq\Select.SizeOpt.cs (1)
44return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue);
System\Linq\Select.SpeedOpt.cs (4)
196return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 261Debug.Assert(uint.CreateTruncating(end - start) <= (uint)int.MaxValue); 449return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue); 567return new IListSkipTakeSelectIterator<TSource, TResult>(_source, _selector, count, int.MaxValue);
System\Linq\Sequence.cs (1)
90if (typeof(T) == typeof(int) && (range = TryUseRange<long>(start, endInclusive, step, int.MaxValue)) is not null) return range;
System\Linq\Skip.SpeedOpt.cs (1)
12(IEnumerable<TSource>)new IListSkipTakeIterator<TSource>(sourceList, count, int.MaxValue) :
System\Linq\SkipTake.SpeedOpt.cs (2)
238Debug.Assert(maxIndexInclusive == -1 || (maxIndexInclusive - minIndexInclusive < int.MaxValue), $"{nameof(Limit)} will overflow!"); 291Debug.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 (8)
System\Linq\Concat.cs (1)
142if (_headIndex == int.MaxValue - 2)
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 (8)
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\runtime\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\runtime\src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (2)
53if (value < 0 || value > int.MaxValue) 71if (pos > int.MaxValue)
src\runtime\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)
115int.MaxValue); 120value = 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)
25internal 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)
152_maxHttp11Connections = int.MaxValue;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (2)
200ReadFromConnectionBuffer(int.MaxValue); 232ReadFromConnectionBuffer(int.MaxValue);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (4)
78private const int MaxStreamId = int.MaxValue; 178return (long)(milliseconds > int.MaxValue ? int.MaxValue : milliseconds); 913ChangeMaxConcurrentStreams(int.MaxValue);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
79_headerDecoder = new QPackDecoder(maxHeadersLength: (int)Math.Min(int.MaxValue, _headerBudgetRemaining));
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
75settings._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)
180(value.TotalMilliseconds > int.MaxValue)) 249(value.TotalMilliseconds > int.MaxValue)) 265(value.TotalMilliseconds > int.MaxValue))
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
120Debug.Assert(client.MaxResponseContentBufferSize is > 0 and <= int.MaxValue);
System.Net.Http.WinHttpHandler (2)
System\Net\Http\WinHttpHandler.cs (2)
49private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue); 81private int _maxConnectionsPerServer = 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\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
61CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
System\Net\Security\SslStream.IO.cs (2)
31private const int UnknownTlsFrameLength = int.MaxValue; // frame too short to determine length 848if (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)
1005public void Listen() => Listen(int.MaxValue); 2451ArgumentOutOfRangeException.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)
71Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 96Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 121Vector512<uint> sign = x.AsUInt32() & Vector512.Create(~(uint)int.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (3)
78Vector128<uint> sign = x.AsUInt32() & Vector128.Create(~(uint)int.MaxValue); 100Vector256<uint> sign = x.AsUInt32() & Vector256.Create(~(uint)int.MaxValue); 122Vector512<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 (193)
src\runtime\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\runtime\src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
194exp = int.MaxValue;
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
190ArgumentOutOfRangeException.ThrowIfGreaterThan(assemblyByteLength, int.MaxValue);
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
179return h < 0 || h > int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (1)
866ArgumentOutOfRangeException.ThrowIfGreaterThan(length, int.MaxValue / 3);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (2)
513int.MaxValue; // no limit other than processor count 550if (tempResult is >= 0 and <= int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (1)
115Debug.Assert(destLength < (int.MaxValue / 4 * 3));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (1)
705internal const int MaximumEncodeLength = (int.MaxValue / 4) * 3; // 1610612733
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (4)
133/// <exception cref="ArgumentException">The length of <paramref name="bytes"/> in bits is greater than <see cref="int.MaxValue"/>.</exception> 137if (bytes.Length > int.MaxValue / BitsPerByte) 237/// <exception cref="ArgumentException">The length of <paramref name="values"/> in bits is greater than <see cref="int.MaxValue"/>.</exception> 247if (values.Length > int.MaxValue / BitsPerInt32)
src\runtime\src\libraries\System.Private.CoreLib\src\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"); 1978_budget = int.MaxValue; 1995_budget = int.MaxValue;
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (1)
271if (rawsize > int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (9)
1037if (value < int.MinValue || value > int.MaxValue) ThrowInt32OverflowException(); 1044if (value > int.MaxValue) ThrowInt32OverflowException(); 2501if (outlen > int.MaxValue) 2803ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 2820else if ((source.Length > (int.MaxValue / 2)) || (destination.Length < (source.Length * 2))) 2843else if ((source.Length > (int.MaxValue / 2)) || (utf8Destination.Length < (source.Length * 2))) 2898ArgumentOutOfRangeException.ThrowIfGreaterThan(bytes.Length, int.MaxValue / 2, nameof(bytes)); 2915else if ((source.Length > (int.MaxValue / 2)) || (destination.Length < (source.Length * 2))) 2938else if ((source.Length > (int.MaxValue / 2)) || (utf8Destination.Length < (source.Length * 2)))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1739int actualResult = (value >= int.MaxValue) ? int.MaxValue :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
2332if (tmp64 > int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (2)
313int sleepDurationInMilliseconds = int.MaxValue; 352if (sleepDurationInMilliseconds == int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
125if ((long)uint64Value < int.MinValue || (long)uint64Value > int.MaxValue) return null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.OSVersion.Unix.cs (1)
53return int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1534return int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (8)
624static int IMinMaxValue<int>.MaxValue => MaxValue; 1028result = (actualValue >= MaxValue) ? MaxValue : 1035result = (actualValue >= MaxValue) ? MaxValue : 1042result = (actualValue >= MaxValue) ? MaxValue : 1462static int IBinaryIntegerParseAndFormatInfo<int>.MaxValueDiv10 => MaxValue / 10;
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
866/// <exception cref="ArgumentOutOfRangeException">The number of characters in the next line is larger than <see cref="int.MaxValue"/>.</exception> 998/// <exception cref="ArgumentOutOfRangeException">The number of characters is larger than <see cref="int.MaxValue"/>.</exception>
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (1)
78Debug.Assert(ucount <= int.MaxValue); // this should fit into a signed int
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
908return int.MaxValue; 1676private const double Int32MaxValueOffset = (double)int.MaxValue + 1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
209return int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (2)
1197binaryExponent = binaryExponent <= (int.MaxValue - digit) / 10 ? 1199int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (3)
1190return int.MaxValue; 1854int actualResult = ((float)value >= int.MaxValue) ? int.MaxValue :
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (6)
60/// <returns>A 32-bit signed integer that is greater than or equal to 0 and less than <see cref="int.MaxValue"/>.</returns> 64AssertInRange(result, 0, int.MaxValue); 190/// Unlike <see cref="Next()"/>, which returns an <see cref="int"/> that is less than <see cref="int.MaxValue"/>, 192/// <see cref="int.MaxValue"/> and may return <see cref="int.MaxValue"/>. 781AssertInRange(result, 0, int.MaxValue);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.Xoshiro256StarStarImpl.cs (1)
84if (result != int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (2)
614int hashCode = RuntimeHelpers.GetHashCode(key) & int.MaxValue; 658hashCode &= int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
653int arraySize = (int)Math.Clamp(newCapacity, MinimumArrayPoolLength, int.MaxValue);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
252/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception> 262/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1627int actualResult = (value >= int.MaxValue) ? int.MaxValue :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (2)
372result = (result < 0) ? int.MaxValue : int.MinValue; 1844result = (result < 0) ? int.MaxValue : int.MinValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (2)
112if (int.MaxValue > _count) 114newSize = int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
44int minimumLength = int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (2)
386int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue; 476minLength = int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
455const int Length = int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (1)
535const int length = int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (12)
235if (totalLength > int.MaxValue) 273if (totalLength > int.MaxValue) 418if (totalLengthLong > int.MaxValue) 1043if (totalSeparatorsLength > int.MaxValue) 1414if (dstLength > int.MaxValue) 1659return SplitInternal(new ReadOnlySpan<char>(in separator), int.MaxValue, options); 1675return Split(separator, int.MaxValue, options); 1717return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1727return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); 1748return SplitInternal(separator, int.MaxValue, options); 1800return SplitInternal(separator ?? Empty, null, int.MaxValue, options); 1810return SplitInternal(null, separator, int.MaxValue, options);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
125if (_fallbackCount == int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (1)
90if (_iCount == int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (1)
153if (_fallbackCount == int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (8)
168/// If the byte count would be greater than <see cref="int.MaxValue"/>. 222/// If the resulting byte count is greater than <see cref="int.MaxValue"/>. 253/// If the return value would exceed <see cref="int.MaxValue"/>. 308/// If the resulting byte count is greater than <see cref="int.MaxValue"/>. 763/// If the char count would be greater than <see cref="int.MaxValue"/>. 816/// If the resulting char count is greater than <see cref="int.MaxValue"/>. 847/// If the return value would exceed <see cref="int.MaxValue"/>. 908/// If the resulting char count is greater than <see cref="int.MaxValue"/>.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (5)
80m_MaxCapacity = int.MaxValue; 89: this(capacity, int.MaxValue) 132m_MaxCapacity = int.MaxValue; 174int persistedMaxCapacity = int.MaxValue; 1005Debug.Assert(insertingChars + this.Length < int.MaxValue);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
242if ((ulong)totalUtf8Bytes > int.MaxValue)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
234/// than <code>-1</code> milliseconds or greater than <see cref="int.MaxValue"/> milliseconds.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (4)
393/// than <see cref="int.MaxValue"/>.</exception> 405ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout)); 424/// than <see cref="int.MaxValue"/>.</exception> 438ArgumentOutOfRangeException.ThrowIfGreaterThan(totalMilliseconds, int.MaxValue, nameof(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
43t_currentProcessorIdCache = ((currentProcessorId << ProcessorIdCacheShift) & int.MaxValue) | s_processorIdRefreshRate;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (1)
242ArgumentOutOfRangeException.ThrowIfGreaterThan(ltm, int.MaxValue, nameof(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (5)
66private const int NO_MAXIMUM = int.MaxValue; 475if (remainingWaitMilliseconds <= int.MaxValue) 482monitorWaitMilliseconds = int.MaxValue; 580/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>. 613/// an infinite time-out -or- timeout is greater than <see cref="int.MaxValue"/>.
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SpinWait.cs (3)
234_count = (_count == int.MaxValue ? YieldThreshold : _count + 1); 278/// <see cref="int.MaxValue"/>.</exception> 283if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
2798/// <see cref="int.MaxValue"/>. 2819/// <see cref="int.MaxValue"/>. 2827if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue) 4940/// <see cref="int.MaxValue"/>. 4947if (totalMilliseconds is < -1 or > int.MaxValue) 5368/// <see cref="int.MaxValue"/>. 5374if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
150public virtual int MaximumConcurrencyLevel => int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
552return int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (9)
107private const int START_INDEX = int.MaxValue; 122if (tail == int.MaxValue) 191if (tail == int.MaxValue) 1458if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1478if (millisecondsTimeOutInterval > (uint)int.MaxValue && millisecondsTimeOutInterval != uint.MaxValue) 1531ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1550ArgumentOutOfRangeException.ThrowIfGreaterThan(millisecondsTimeOutInterval, int.MaxValue); 1571ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, int.MaxValue, nameof(timeout)); 1592ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, int.MaxValue, nameof(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\TimerQueue.Portable.cs (2)
96shortestWaitDurationMs = int.MaxValue; 133if (shortestWaitDurationMs == int.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
83ArgumentOutOfRangeException.ThrowIfGreaterThan(timeoutMilliseconds, int.MaxValue, nameof(timeout));
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1913int actualResult = (value >= new UInt128(0x0000_0000_0000_0000, 0x0000_0000_7FFF_FFFF)) ? int.MaxValue : (int)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
1062int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1069int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1058int actualResult = (value >= int.MaxValue) ? int.MaxValue : (int)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
314/// <exception cref="OverflowException">At least one component in <paramref name="utf8Text" /> represents a number that is greater than <see cref="int.MaxValue"/>.</exception>
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
442/// this instance exceed <see cref="int.MaxValue"/>.</exception>
System\Array.NativeAot.cs (1)
153if (totalLength > int.MaxValue)
System\CrashInfo.cs (6)
81if (!WriteExceptionWithFallback(key, exception, int.MaxValue, 500, int.MaxValue)) 84if (!WriteExceptionWithFallback(key, exception, int.MaxValue, 10, int.MaxValue)) 87WriteExceptionWithFallback(key, exception, int.MaxValue, 10, 100); 274private bool WriteStringValue(ReadOnlySpan<byte> key, string value, int maxChars = int.MaxValue, bool truncateLeft = false)
System\RuntimeExceptionHelpers.cs (1)
318Thread.Sleep(int.MaxValue);
System\Threading\SyncTable.cs (1)
196Debug.Assert(ObjectHeader.MASK_HASHCODE_INDEX < int.MaxValue);
System.Private.DataContractSerialization (49)
System\Runtime\Serialization\DataContract.cs (2)
424int 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)
371if (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)
453if (index == int.MaxValue) 456SR.Format(SR.MaxArrayLengthExceeded, int.MaxValue, 459int 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.Reflection.Execution (2)
src\runtime\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.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)
435int leastDerivedLevel = int.MaxValue;
System\Xml\Serialization\XmlReflectionImporter.cs (1)
2395_maxDepth = DiagnosticsSwitches.NonRecursiveTypeLoading.Enabled ? 1 : int.MaxValue;
System\Xml\Serialization\XmlSerializationWriter.cs (1)
635if (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)
2083if (0 <= dblGroupingSize && dblGroupingSize <= int.MaxValue) 2095_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)
139return GetUTF8ByteCount(str, charCount, int.MaxValue, out _);
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
69if (maxSize > int.MaxValue)
System\Reflection\Metadata\BlobReader.cs (1)
15internal const int InvalidCompressedInteger = int.MaxValue;
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (1)
342branch = 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)
118if (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\runtime\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\runtime\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 (21)
src\runtime\src\libraries\Common\src\System\Number.Parsing.Common.cs (1)
194exp = int.MaxValue;
System\Number.BigInteger.cs (2)
224if ((nint)(leading ^ signBits) >= 0 && int.MinValue < signedLeading && signedLeading <= int.MaxValue) 330if (number.Scale == int.MaxValue)
System\Numerics\BigInteger.cs (13)
32private const int MinIntSplitShift = int.MaxValue - BitsPerUInt32 + 1; 82if (value <= int.MaxValue) 98if (value is > int.MinValue and <= int.MaxValue) 137if (value <= int.MaxValue) 313if (_bits.Length is 1 && _bits[0] <= int.MaxValue) 2347if ((int.MinValue < value) && (value <= int.MaxValue)) 2433if (value <= (ulong)int.MaxValue) 2480public static implicit operator BigInteger(nuint value) => value <= int.MaxValue ? new BigInteger((int)value, null) : new BigInteger(+1, [value]); 2642if (digitShift == 0 && r <= int.MaxValue) 3119Debug.Assert(_bits.Length > 1 || _bits[0] > int.MaxValue); 4655actualResult = IsNegative(value) ? int.MinValue : int.MaxValue; 4659actualResult = (value._sign >= int.MaxValue) ? int.MaxValue :
System\Numerics\Complex.cs (4)
1902int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue : 2044int actualResult = (value.m_real >= int.MaxValue) ? int.MaxValue :
System\Numerics\NumericsHelpers.cs (1)
31exp = int.MaxValue;
System.Runtime.Serialization.Formatters (5)
src\runtime\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 (22)
src\runtime\src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
42int length = (int)Math.Min(int.MaxValue, fileStream.Length);
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
61CancellationTokenSource? 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\CngSymmetricAlgorithmCore.cs (1)
312if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(_outer.LegalKeySizes))
System\Security\Cryptography\DESCryptoServiceProvider.Windows.cs (1)
70if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(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\RC2CryptoServiceProvider.Windows.cs (1)
86if (keySize > int.MaxValue || !((int)keySize).IsLegalSize(this.LegalKeySizes))
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\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.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\PureDataToBeSignedBuilder.cs (1)
42Debug.Assert(_stream.Length <= 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 (6)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
51if (bindingElement.MaxReceivedMessageSize > int.MaxValue)
System\ServiceModel\Channels\HttpTransportBindingElement.cs (2)
133if (maxReceivedMessageSize > int.MaxValue) 135return int.MaxValue;
System\ServiceModel\Channels\MessageContent.cs (1)
247_buffer = _messageEncoder.WriteMessage(_message, int.MaxValue, _bufferManager);
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
304return MessageEncoder.WriteMessage(message, int.MaxValue, BufferManager, 0);
System\ServiceModel\WSHttpBindingBase.cs (1)
70if (value > 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 (86)
Internals\System\Runtime\BufferedOutputStream.cs (4)
43: this(0, maxSize, InternalBufferManager.Create(0, int.MaxValue)) 113if (_currentChunk.Length > (int.MaxValue / 2)) 115newChunkSize = int.MaxValue; 267if ((int.MaxValue - size) < _totalSize)
Internals\System\Runtime\InternalBufferManager.cs (2)
66int bufferCount = bufferCountLong > int.MaxValue ? int.MaxValue : (int)bufferCountLong;
Internals\System\Runtime\IOThreadTimer.cs (1)
651Contract.Assert(waitDurationInMillis < int.MaxValue, "Waiting for longer than is possible");
Internals\System\Runtime\TimeoutHelper.cs (3)
15public static readonly TimeSpan MaxWait = TimeSpan.FromMilliseconds(int.MaxValue); 91if (ticks / TimeSpan.TicksPerMillisecond > int.MaxValue) 93return int.MaxValue;
Internals\System\Text\BinHexEncoding.cs (2)
116if (byteCount < 0 || byteCount > int.MaxValue / 2) 117throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(byteCount), SRP.Format(SRP.ValueMustBeInRange, 0, int.MaxValue / 2)));
Internals\System\Xml\XmlMtomReader.cs (2)
38return Create(stream, encodings, contentType, quotas, int.MaxValue, null); 64return Create(buffer, offset, count, encodings, contentType, quotas, int.MaxValue, null);
Internals\System\Xml\XmlMtomWriter.cs (3)
1413if (newSize == int.MaxValue) 1415newSize = (newSize < int.MaxValue / 2) ? newSize * 2 : int.MaxValue;
System\ServiceModel\Channels\AddressHeader.cs (6)
37return CreateAddressHeader(value, DataContractSerializerDefaults.CreateSerializer(type, int.MaxValue/*maxItems*/)); 52return CreateAddressHeader(name, ns, value, DataContractSerializerDefaults.CreateSerializer(GetObjectType(value), name, ns, int.MaxValue/*maxItems*/)); 119return GetValue<T>(DataContractSerializerDefaults.CreateSerializer(typeof(T), Name, Namespace, int.MaxValue/*maxItems*/)); 144XmlBuffer buffer = new XmlBuffer(int.MaxValue); 323: base(name.Value, ns.Value, value, DataContractSerializerDefaults.CreateSerializer(GetObjectType(value), name, ns, int.MaxValue/*maxItems*/)) 344_buffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Channels\BufferedMessageWriter.cs (2)
34if (maxSizeQuota <= int.MaxValue - initialOffset) 40effectiveMaxSize = int.MaxValue;
System\ServiceModel\Channels\ChannelReliableSession.cs (1)
37protected Guard Guard { get; } = new Guard(int.MaxValue);
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (1)
20private Guard _guard = new Guard(int.MaxValue);
System\ServiceModel\Channels\InternalDuplexBindingElement.cs (2)
25_priority = Int32.MaxValue - 1; 29_priority = Int32.MaxValue;
System\ServiceModel\Channels\MaxMessageSizeStream.cs (1)
119if (bytesRemaining > int.MaxValue)
System\ServiceModel\Channels\Message.cs (7)
118return CreateMessage(version, action, body, DataContractSerializerDefaults.CreateSerializer(GetObjectType(body), int.MaxValue/*maxItems*/)); 300return GetBodyCore<T>(reader, DataContractSerializerDefaults.CreateSerializer(typeof(T), int.MaxValue/*maxItems*/)); 326XmlBuffer buffer = new XmlBuffer(int.MaxValue); 414XmlBuffer bodyBuffer = new XmlBuffer(int.MaxValue); 1604int maxSizeOfAttributes = int.MaxValue; 1606if (maxSizeOfAttributes < int.MaxValue - 4096) 1958int maxSizeOfHeaders = int.MaxValue;
System\ServiceModel\Channels\MessageBuffer.cs (1)
131msg = Message.CreateMessage(_msgBuffer.GetReader(0), int.MaxValue, _version);
System\ServiceModel\Channels\MessageEncoderCompressionHandler.cs (2)
20int maxDecompressedSize = (int)Math.Min(maxReceivedMessageSize, int.MaxValue); 61using (BufferManagerOutputStream bufferedOutStream = new BufferManagerOutputStream(SRP.MaxSentMessageSizeExceeded, 1024, int.MaxValue, bufferManager))
System\ServiceModel\Channels\MessageFault.cs (3)
32(detail == null ? typeof(object) : detail.GetType()), int.MaxValue/*maxItems*/), "", ""); 182return GetDetail<T>(DataContractSerializerDefaults.CreateSerializer(typeof(T), int.MaxValue/*maxItems*/)); 242XmlBuffer detailBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Channels\MessageHeader.cs (1)
473(_objectToSerialize == null ? typeof(object) : _objectToSerialize.GetType()), Name, Namespace, int.MaxValue/*maxItems*/);
System\ServiceModel\Channels\MessageHeaders.cs (5)
511XmlBuffer buffer = new XmlBuffer(int.MaxValue); 521XmlBuffer buffer = new XmlBuffer(int.MaxValue); 531XmlBuffer buffer = new XmlBuffer(int.MaxValue); 964return GetHeader<T>(name, ns, DataContractSerializerDefaults.CreateSerializer(typeof(T), name, ns, int.MaxValue/*maxItems*/)); 1004return GetHeader<T>(index, DataContractSerializerDefaults.CreateSerializer(typeof(T), headerInfo.Name, headerInfo.Namespace, int.MaxValue/*maxItems*/));
System\ServiceModel\Channels\MtomMessageEncoder.cs (4)
93xmlWriter = XmlMtomWriter.Create(stream, _writeEncoding, int.MaxValue, startInfo, boundary, startUri, writeMessageHeaders, false); 101((IXmlMtomWriterInitializer)xmlWriter).SetOutput(stream, _writeEncoding, int.MaxValue, startInfo, boundary, startUri, writeMessageHeaders, false); 501XmlDictionaryReader xmlDictionaryReader = XmlMtomReader.Create(messageData.Array, messageData.Offset, messageData.Count, MtomMessageEncoderFactory.GetSupportedEncodings(), contentType, XmlDictionaryReaderQuotas.Max, int.MaxValue, null); 673internal int _maxSizeInBytes = int.MaxValue;
System\ServiceModel\Channels\ReliableOutputConnection.cs (1)
23private Guard _sendGuard = new Guard(int.MaxValue);
System\ServiceModel\Channels\ReliableRequestSessionChannel.cs (1)
48replyAckConsistencyGuard = new Guard(int.MaxValue);
System\ServiceModel\Channels\TransmissionStrategy.cs (2)
94QuotaRemaining = int.MaxValue; 989Buffer = message.CreateBufferedCopy(int.MaxValue);
System\ServiceModel\Channels\TransportChannelFactory.cs (2)
143if (MaxReceivedMessageSize > int.MaxValue) 145return int.MaxValue;
System\ServiceModel\Channels\TransportDefaults.cs (4)
31public const int BufferedReadDefaultMaxStringContentLength = Int32.MaxValue; 32public const int BufferedReadDefaultMaxArrayLength = Int32.MaxValue; 33public const int BufferedReadDefaultMaxBytesPerRead = Int32.MaxValue; 34public const int BufferedReadDefaultMaxNameTableCharCount = Int32.MaxValue;
System\ServiceModel\Channels\WsrmFault.cs (1)
757buffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Description\ServiceReflector.cs (1)
142for (int i = 0; i < Int32.MaxValue; i++)
System\ServiceModel\Diagnostics\MessageLogger.cs (1)
30All = int.MaxValue
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
19internal const int MaxItemsInObjectGraph = int.MaxValue;
System\ServiceModel\Dispatcher\FaultContractInfo.cs (2)
52_serializer = DataContractSerializerDefaults.CreateSerializer(Detail, KnownTypes, int.MaxValue /* maxItemsInObjectGraph */); 56_serializer = DataContractSerializerDefaults.CreateSerializer(Detail, KnownTypes, ElementName, _ns == null ? string.Empty : _ns, int.MaxValue /* maxItemsInObjectGraph */);
System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
100return DataContractSerializerDefaults.CreateSerializer(detailType, int.MaxValue /* maxItemsInObjectGraph */ );
System\ServiceModel\Security\SecurityAppliedMessage.cs (2)
310_fullBodyBuffer = new XmlBuffer(int.MaxValue); 327BufferedOutputStream fullBodyFragment = new BufferManagerOutputStream(SRP.XmlBufferQuotaExceeded, 1024, int.MaxValue, _securityHeader.StreamBufferManager);
System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
141_streamBufferManager = BufferManager.CreateBufferManager(0, int.MaxValue);
System\ServiceModel\Security\SecuritySessionClientSettings.cs (1)
658using (MessageBuffer buffer = message.CreateBufferedCopy(int.MaxValue))
System\ServiceModel\Security\SecurityVerifiedMessage.cs (1)
45_messageBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Security\SendSecurityHeader.cs (1)
57_bufferManager = BufferManager.CreateBufferManager(0, int.MaxValue);
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (2)
145canonicalBuffer = new XmlBuffer(int.MaxValue); 189canonicalBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Security\WSTrust.cs (2)
278issuedTokenBuffer = new XmlBuffer(Int32.MaxValue); 309XmlBuffer rstrBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\SynchronizedKeyedCollection.cs (5)
25_threshold = int.MaxValue; 32_threshold = int.MaxValue; 39_threshold = int.MaxValue; 48SRP.Format(SRP.ValueMustBeInRange, -1, int.MaxValue))); 52_threshold = int.MaxValue;
System\ServiceModel\XmlBuffer.cs (1)
60BufferManager.CreateBufferManager(0, 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)
39_maxExtensionSize = int.MaxValue; 46_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (2)
35_maxExtensionSize = int.MaxValue; 41_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
41_maxExtensionSize = int.MaxValue; 54_maxExtensionSize = int.MaxValue;
System\ServiceModel\Syndication\SyndicationElementExtension.cs (2)
30_buffer = new XmlBuffer(int.MaxValue); 206_buffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (1)
203XmlBuffer newBuffer = new XmlBuffer(int.MaxValue);
System\ServiceModel\Syndication\XmlSyndicationContent.cs (2)
45_contentBuffer = new XmlBuffer(int.MaxValue); 175XmlBuffer tmp = new XmlBuffer(int.MaxValue);
System.ServiceModel.UnixDomainSocket.Tests (1)
ServiceModel\UnixDomainSocketBindingTest.cs (1)
55[InlineData(int.MaxValue)]
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceBase.cs (1)
88if (totalMilliseconds < -1 || totalMilliseconds > int.MaxValue)
System.Speech (13)
Internal\SeekableReadStream.cs (1)
110if (bytesToReadLong > int.MaxValue)
Internal\SrgsCompiler\CFGGrammar.cs (2)
80if (ulTotalSerializedSize < SP_SPCFGSERIALIZEDHEADER_500 || ulTotalSerializedSize > int.MaxValue) 140if (ulTotalSerializedSize < SP_SPCFGSERIALIZEDHEADER_500 || ulTotalSerializedSize > int.MaxValue)
Internal\SrgsCompiler\Item.cs (2)
67if (_maxRepeat == int.MaxValue && _minRepeat == 1) 95if (_maxRepeat == int.MaxValue)
Internal\SrgsParser\XmlParser.cs (2)
1787maxRepeat = int.MaxValue; 1790if (minRepeat < 0 || minRepeat > 255 || (maxRepeat != int.MaxValue && (maxRepeat < 0 || maxRepeat > 255)))
Internal\Synthesis\VoiceSynthesis.cs (1)
210int pos = int.MaxValue;
Recognition\SrgsGrammar\SrgsItem.cs (3)
87if (maxRepeat != int.MaxValue && (maxRepeat < 0 || maxRepeat > 255)) 196else if (_maxRepeat == int.MaxValue || _maxRepeat == NotSet) 246else if (_maxRepeat == int.MaxValue || _maxRepeat == NotSet)
Synthesis\TTSEngine\TTSEngineTypes.cs (2)
364public const int AbsoluteNumber = int.MaxValue; 374_ssmlAttributeId = int.MaxValue;
System.Text.Encoding.CodePages (2)
System\Text\DecoderBestFitFallback.cs (1)
97if (iCount == int.MaxValue)
System\Text\EncoderBestFitFallback.cs (1)
119if (_iCount == int.MaxValue)
System.Text.Json (155)
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)
901Debug.Assert(reader.TokenStartIndex <= int.MaxValue); 988Debug.Assert(tokenStart < int.MaxValue); 1013Debug.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)
248if (newCapacity == toReturn.Length) newCapacity = int.MaxValue;
System\Text\Json\JsonConstants.cs (1)
82public 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\PipeReadBufferState.cs (1)
41_unsuccessfulReadBytes = (int)Math.Min(int.MaxValue, leftOver * 2);
System\Text\Json\Serialization\StreamReadBufferState.cs (2)
139byte[] newBuffer = ArrayPool<byte>.Shared.Rent((_buffer.Length < (int.MaxValue / 2)) ? _buffer.Length * 2 : int.MaxValue);
System\Text\Json\Writer\JsonWriterHelper.cs (1)
336Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
861Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); 1010Debug.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)
119Debug.Assert(maxRequiredBytes >= 0 && maxRequiredBytes < int.MaxValue - 3); 147Debug.Assert(maxRequiredBytes >= 0 && maxRequiredBytes < int.MaxValue - indent - 3 - _newLineLength); 183Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); 267Debug.Assert(escapedValue.Length < int.MaxValue - 3); 297Debug.Assert(escapedValue.Length < int.MaxValue - indent - 3 - _newLineLength); 334Debug.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 (87)
System\Text\RegularExpressions\MatchCollection.cs (1)
224GetMatch(int.MaxValue);
System\Text\RegularExpressions\Regex.EnumerateSplits.cs (1)
203_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 (12)
1275Debug.Assert(target.LoopNode.N == int.MaxValue); 1912int minValue = int.MaxValue; 3840if (node.N != int.MaxValue) 4159Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4480if (maxIterations != int.MaxValue) 4749if (maxIterations != int.MaxValue) 4760else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4773else if (maxIterations == int.MaxValue && CanEmitIndexOf(node, out _)) 4864if (maxIterations != int.MaxValue) 5007Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 5045Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 5177switch ((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; 438case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue: 439case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry: 940u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min; 945u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max; 949if (min == int.MaxValue) 1884if (nodeMin == int.MaxValue || 1885nextMin == int.MaxValue || 1886(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1892if (nodeMax != int.MaxValue && 1893nextMax != int.MaxValue && 1894(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1923if (currentNode.N != int.MaxValue) 1925currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1937if (currentNode.N != int.MaxValue) 1964if (currentNode.N != int.MaxValue) 2006currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2868return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2900return (int)Math.Min(int.MaxValue - 1, sum); 2970return N == int.MaxValue ? null : N; 2973if (N != int.MaxValue) 2979if (maxLength < int.MaxValue) 3034if (sum < int.MaxValue) 3558(M == 0 && N == int.MaxValue) ? "*" : 3560(M == 1 && N == int.MaxValue) ? "+" : 3561(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; 467max = int.MaxValue; 476max = int.MaxValue; 487max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 1995_captop = i == int.MaxValue ? i : i + 1;
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
1159if (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)
139_anyStar = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: false); 140_anyStarLazy = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: true); 208internal SymbolicRegexNode<TSet> CreateLoop(SymbolicRegexNode<TSet> node, bool isLazy, int lower = 0, int upper = int.MaxValue) 223if (!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 (15)
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; 1738if (_upper == int.MaxValue) 2010return (_upper < int.MaxValue) && (_upper > upperBoundLowestValue); 2316if (_upper == int.MaxValue) 2318if (_lower is 0 or int.MaxValue) 2387if (current._upper == int.MaxValue) 2414return (int)Math.Min((long)m + n, int.MaxValue); 2421return (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)
1504Debug.Assert(target.LoopNode.N == int.MaxValue); 3613if (node.N != int.MaxValue) 3827Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4062if (maxIterations != int.MaxValue || iterationMayBeEmpty) 4067if (maxIterations == int.MaxValue) 4272if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4287string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4295else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass) 4303else if (maxIterations == int.MaxValue && TryEmitIndexOf(requiredHelpers, node, useLast: false, negate: true, out _, out string? indexOfExpr)) 4332if (minIterations != 0 || maxIterations != int.MaxValue) 4343string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : ""; 4417Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4437Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4563if (maxIterations == int.MaxValue && !iterationMayBeEmpty) 4580else if (minIterations > 0 && maxIterations == int.MaxValue) 4596else if (maxIterations == int.MaxValue) 5836(0, int.MaxValue) => " any number of times", 5837(1, int.MaxValue) => " at least once", 5838(2, int.MaxValue) => " at least twice", 5839(_, int.MaxValue) => $" at least {node.M} times",
src\runtime\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; 438case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue: 439case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry: 940u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min; 945u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max; 949if (min == int.MaxValue) 1884if (nodeMin == int.MaxValue || 1885nextMin == int.MaxValue || 1886(uint)nodeMin + (uint)nextMin >= int.MaxValue) 1892if (nodeMax != int.MaxValue && 1893nextMax != int.MaxValue && 1894(uint)nodeMax + (uint)nextMax >= int.MaxValue) 1923if (currentNode.N != int.MaxValue) 1925currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N; 1937if (currentNode.N != int.MaxValue) 1964if (currentNode.N != int.MaxValue) 2006currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1; 2868return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2900return (int)Math.Min(int.MaxValue - 1, sum); 2970return N == int.MaxValue ? null : N; 2973if (N != int.MaxValue) 2979if (maxLength < int.MaxValue) 3034if (sum < int.MaxValue) 3558(M == 0 && N == int.MaxValue) ? "*" : 3560(M == 1 && N == int.MaxValue) ? "+" : 3561(N == int.MaxValue) ? $"{{{M}, *}}" :
src\runtime\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\runtime\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; 467max = int.MaxValue; 476max = int.MaxValue; 487max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 1995_captop = i == int.MaxValue ? i : i + 1;
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
1159if (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> 534/// <see cref="int.MaxValue"/>.</exception> 581if (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\runtime\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\runtime\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)
116if ((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)
147int maxConcurrencyLevel = (options.EffectiveMaxConcurrencyLevel > 0) ? options.EffectiveMaxConcurrencyLevel : 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 (52)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
3239Select(0, int.MaxValue);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
7806int lRowIndex = int.MaxValue;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
2541Size requiredSize = TextRenderer.MeasureText(text, font, new Size(maxWidth, int.MaxValue), flags); 2580textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, int.MaxValue), flags); 2609return TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (3)
243if (value == int.MaxValue) 245throw new ArgumentOutOfRangeException(nameof(value), value, string.Format(SR.DataGridViewColumn_DisplayIndexTooLarge, int.MaxValue)); 309Debug.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)
514textSize = 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)] 2895PInvokeCore.SendMessage(this, PInvokeCore.EM_EXLIMITTEXT, 0, int.MaxValue);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1838end = start > 0 ? int.MaxValue : int.MinValue;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
304proposedSize.Width = int.MaxValue; 309proposedSize.Height = int.MaxValue;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
27internal static Point s_invalidMouseEnter = new(int.MaxValue, int.MaxValue); 2233proposedSize.Width = int.MaxValue; 2238proposedSize.Height = int.MaxValue;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
1939int.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)
6904mmi->ptMaxTrackSize.Y = int.MaxValue; 6909mmi->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)
1262int top = int.MaxValue; 1263int left = int.MaxValue;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (4)
183int currentMinTopLeft = int.MaxValue; 190lastOffset = int.MaxValue; 250currentMinTopLeft = int.MaxValue; 281currentMinTopLeft = int.MaxValue;
System.Xaml (2)
System\Xaml\Schema\MemberReflector.cs (2)
16private const DesignerSerializationVisibility VisibilityInvalid = (DesignerSerializationVisibility)int.MaxValue; 18private const DesignerSerializationVisibility VisibilityNone = (DesignerSerializationVisibility)(int.MaxValue - 1);
tlens (1)
src\runtime\src\tools\illink\external\Mono.Options\Options.cs (1)
221int width = GetNextWidth(ewidths, int.MaxValue, ref hw);
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)