3379 references to MaxValue
Aspire.Confluent.Kafka (1)
Aspire.Dashboard (3)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (5)
Aspire.Hosting (3)
Aspire.Hosting.Oracle.Tests (3)
Aspire.Hosting.SqlServer.Tests (2)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.StackExchange.Redis (1)
BinaryFormatTests (7)
BuildActionTelemetryTable (6)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Contract.Message.IntegrationTests (1)
DemoConsole (1)
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (139)
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.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\Diagnostics\MessageLogger.cs (1)
29All = int.MaxValue
Extensibility.MessageEncoder.IntegrationTests (1)
GenerateDocumentationAndConfigFiles (37)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
http2cat (1)
IIS.FunctionalTests (2)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (1)
illink (1)
InMemory.FunctionalTests (28)
Http2\Http2ConnectionTests.cs (15)
832_clientSettings.InitialWindowSize = int.MaxValue;
837await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize);
1065_clientSettings.InitialWindowSize = int.MaxValue;
1070await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize);
1284_clientSettings.InitialWindowSize = int.MaxValue;
1289await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize);
1398_clientSettings.InitialWindowSize = int.MaxValue;
1421await SendWindowUpdateAsync(0, int.MaxValue - (int)Http2PeerSettings.DefaultInitialWindowSize);
1701_serviceContext.ServerOptions.Limits.Http2.MaxStreamsPerConnection = int.MaxValue;
1705Assert.Equal((uint)int.MaxValue * 2, _connection.MaxTrackedStreams);
1784expectedLastStreamId: int.MaxValue,
3780[InlineData((int)(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE), (uint)int.MaxValue + 1, (int)(Http2ErrorCode.FLOW_CONTROL_ERROR))]
5144VerifyGoAway(await ReceiveFrameAsync(), int.MaxValue, Http2ErrorCode.INTERNAL_ERROR);
5219VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR);
5250VerifyGoAway(await ReceiveFrameAsync(), Int32.MaxValue, Http2ErrorCode.NO_ERROR);
Interop.FunctionalTests (1)
Metrics (33)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Metrics.Legacy (33)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.Analyzers.Local (2)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.Components (5)
Microsoft.AspNetCore.Components.Server.Tests (4)
Circuits\RenderBatchWriterTest.cs (4)
49new ArrayRange<int>(new[] { 123, int.MaxValue, int.MinValue, 456 }, 3), // Only use first 3 to show that param is respected
573, 123, int.MaxValue, int.MinValue, // DisposedComponentIds as length-prefixed array
104new RenderTreeDiff(int.MaxValue, default),
118int.MaxValue, // ComponentId
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Mvc.Core (3)
Microsoft.AspNetCore.Mvc.Core.Test (6)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (9)
DefaultHtmlGeneratorTest.cs (8)
868{ nameof(Model.FlagsEnum), int.MaxValue, new [] { "2147483647" } },
869{ nameof(Model.FlagsEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } },
881{ nameof(Model.Id), int.MaxValue, new [] { "2147483647" } },
882{ nameof(Model.Id), (uint)int.MaxValue + 1, new [] { "2147483648" } }, // no limit checks
901{ nameof(Model.NullableEnum), int.MaxValue, new [] { "2147483647" } },
902{ nameof(Model.NullableEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } },
921{ nameof(Model.RegularEnum), int.MaxValue, new [] { "2147483647" } },
922{ nameof(Model.RegularEnum), (uint)int.MaxValue + 1, new [] { "2147483648" } },
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.AspNetCore.OpenApi.Tests (2)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.Razor.Runtime.Test (16)
Runtime\TagHelpers\TagHelperRunnerTest.cs (16)
48new[] { 1000, int.MaxValue, 0 },
49new[] { 0, 1000, int.MaxValue }
52new[] { int.MaxValue, int.MaxValue, int.MinValue },
53new[] { int.MinValue, int.MaxValue, int.MaxValue }
64new[] { 0, 1000, int.MaxValue },
65new[] { 0, 1000, int.MaxValue }
68new[] { int.MaxValue, int.MinValue, int.MaxValue, -1000, int.MaxValue, 0 },
69new[] { int.MinValue, -1000, 0, int.MaxValue, int.MaxValue, int.MaxValue }
77new[] { 1000, int.MaxValue, 0, -1000, int.MinValue },
78new[] { int.MinValue, -1000, 0, 1000, int.MaxValue }
Microsoft.AspNetCore.Razor.Test (1)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (2)
Microsoft.AspNetCore.ResponseCompression (1)
Microsoft.AspNetCore.Routing (3)
Microsoft.AspNetCore.Routing.Tests (7)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (11)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
src\Shared\test\Shared.Tests\runtime\Http2\HPackIntegerTest.cs (2)
87yield return new object[] { int.MaxValue, 1, new byte[] { 0x01, 0xfe, 0xff, 0xff, 0xff, 0x07 } };
88yield return new object[] { int.MaxValue, 8, new byte[] { 0xff, 0x80, 0xfe, 0xff, 0xff, 0x07 } };
Microsoft.AspNetCore.Shared.Tests (6)
runtime\Http2\HPackIntegerTest.cs (2)
87yield return new object[] { int.MaxValue, 1, new byte[] { 0x01, 0xfe, 0xff, 0xff, 0xff, 0x07 } };
88yield return new object[] { int.MaxValue, 8, new byte[] { 0xff, 0x80, 0xfe, 0xff, 0xff, 0x07 } };
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
Microsoft.AspNetCore.SignalR.Tests (1)
Microsoft.AspNetCore.WebUtilities.Tests (6)
Microsoft.Build.Framework (3)
Microsoft.CodeAnalysis (158)
InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = 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:
Microsoft.CodeAnalysis.Analyzers (38)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.AnalyzerUtilities (32)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.BannedApiAnalyzers (35)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.CodeStyle (34)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.Collections.Package (2)
Microsoft.CodeAnalysis.CSharp (37)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\NumericIntPtrTests.cs (15)
2596F({(uint)int.MaxValue + 1});
2888verify((FieldSymbol)comp.GetMember("Program.C"), int.MaxValue, signed: true, negative: false);
6292values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
6328values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
6364values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
6437values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
6473values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
6509values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
6666values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
6704values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
6742values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
9396string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (52)
Semantics\NativeIntegerTests.cs (16)
797CompileAndVerify(comp, expectedOutput: $"{int.MinValue}, {int.MaxValue}, -1, 1");
6728F({(uint)int.MaxValue + 1});
7051verify((FieldSymbol)comp.GetMember("Program.C"), int.MaxValue, signed: true, negative: false);
9769values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
9805values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
9843values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
9918values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
9954values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
9992values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
10144values: $"{int.MinValue}, -1, 0, {int.MaxValue - 1}, {int.MaxValue}",
10182values: $"0, {int.MaxValue}, {uint.MaxValue - 1}, {uint.MaxValue}",
10220values: $"{int.MinValue}, {int.MinValue + 1}, 0, 1, {int.MaxValue}",
13761string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Utilities\ValueSetTests.cs (35)
33[InlineData(int.MaxValue)]
37Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString());
45int i1 = Random.Next(int.MinValue, int.MaxValue);
47Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString());
62[InlineData(int.MaxValue)]
66Assert.Equal((i1 == int.MaxValue) ? "" : $"[{i1 + 1}..{int.MaxValue}]", values.ToString());
74int i1 = Random.Next(int.MinValue, int.MaxValue);
76Assert.Equal($"[{i1 + 1}..{int.MaxValue}]", values.ToString());
91[InlineData(int.MaxValue)]
103int i1 = Random.Next(int.MinValue, int.MaxValue) + 1;
120[InlineData(int.MaxValue)]
132int i1 = Random.Next(int.MinValue, int.MaxValue) + 1;
149[InlineData(int.MaxValue)]
161int i1 = Random.Next(int.MinValue, int.MaxValue);
172int i1 = Random.Next(int.MinValue + 1, int.MaxValue);
173int i2 = Random.Next(int.MinValue, int.MaxValue);
187int i1 = Random.Next(int.MinValue + 1, int.MaxValue);
188int i2 = Random.Next(int.MinValue, int.MaxValue);
203int i1 = Random.Next(int.MinValue + 1, int.MaxValue);
204int i2 = Random.Next(int.MinValue, int.MaxValue);
208Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString());
219int i1 = Random.Next(int.MinValue + 1, int.MaxValue);
220int i2 = Random.Next(int.MinValue, int.MaxValue);
223Assert.Equal($"[{int.MinValue}..{int.MaxValue}]", values1.ToString());
234int i1 = Random.Next(int.MinValue + 1, int.MaxValue);
235int i2 = Random.Next(int.MinValue, int.MaxValue);
239Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString());
251int i1 = Random.Next(int.MinValue, int.MaxValue);
252int i2 = Random.Next(int.MinValue, int.MaxValue);
260test(int.MaxValue);
280int i1 = Random.Next(int.MinValue, int.MaxValue);
281int i2 = Random.Next(int.MinValue, int.MaxValue);
788int j = Random.Next(0, int.MaxValue - 1);
834int j = Random.Next(0, int.MaxValue - 1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (26)
Compilation\CompilationAPITests.cs (5)
834Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue);
835Assert.InRange(comp.GetDeclarationDiagnostics().Count(), 0, int.MaxValue);
888Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue);
898Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue);
906Assert.InRange(error.Count(), 1, int.MaxValue);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Extensions.Package (8)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.CodeAnalysis.Features (12)
Microsoft.CodeAnalysis.InteractiveHost (9)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (35)
Microsoft.CodeAnalysis.PublicApiAnalyzers (32)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (32)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.Scripting (3)
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.Threading.Package (3)
Microsoft.CodeAnalysis.UnitTests (30)
Collections\HashSet\SegmentedHashSet_Generic_Tests`1.cs (5)
538Assert.InRange(set.EnsureCapacity(requestedCapacity), requestedCapacity, int.MaxValue);
597Assert.InRange(set.EnsureCapacity(setLength - 1), setLength, int.MaxValue);
612Assert.InRange(newCapacity, currentCapacity * 2, int.MaxValue);
665Assert.InRange(c.EqualsCalls, 1, int.MaxValue);
666Assert.InRange(c.GetHashCodeCalls, 1, int.MaxValue);
Collections\List\SegmentedList.Generic.Tests.Find.cs (6)
77Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(int.MaxValue, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
107Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
122Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException"
167Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
182Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(list.Count - 1, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException"
221Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MaxValue, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
Collections\List\SegmentedList.Generic.Tests.Misc.cs (3)
72int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue };
112int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue };
184int[] bad = new int[] { items.Length + 1, items.Length + 2, int.MaxValue, -1, -2, int.MinValue };
MetadataReferences\AssemblyIdentityTests.cs (5)
238new Version(int.MaxValue, 0, 0, 0),
239new Version(0, int.MaxValue, 0, 0),
240new Version(0, 0, int.MaxValue, 0),
241new Version(0, 0, 0, int.MaxValue),
248Assert.Throws<ArgumentOutOfRangeException>(() => new AssemblyIdentity("Goo", contentType: (AssemblyContentType)int.MaxValue));
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Semantics\OverloadResolution.vb (3)
2513Assert.InRange(numericTypesPrecedence(i), prev + 1, Integer.MaxValue)
2882Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing)
3073Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (41)
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
246? int.MaxValue
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (9)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (6)
Microsoft.Data.Analysis.Tests (5)
Microsoft.DotNet.Arcade.Sdk.Tests (1)
Microsoft.DotNet.Build.Tasks.Feed.Tests (7)
PublishArtifactsInManifestTests.cs (7)
180[InlineData("QXJjYWRl", "QXJjYWRl", new int[] { int.MaxValue }, new int[] { int.MaxValue }, 1024)]
182[InlineData("QXJjYWRl", "QXJjYWRm", new int[] { int.MaxValue }, new int[] { int.MaxValue }, 1024)]
184[InlineData("QXJjYWRl", "QXJjYWRl", new int[] { int.MaxValue }, new int[] { 1, 1, 1, 1, 1 }, 1024)]
186[InlineData("QXJjYWRl", "QXJjYWRm", new int[] { int.MaxValue }, new int[] { 1, 1, 1, 1, 1 }, 1024)]
226int maxStreamBytesThisCall = int.MaxValue;
Microsoft.DotNet.Build.Tasks.Packaging (4)
Microsoft.DotNet.SignTool (4)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.Evaluation.NLP (1)
Microsoft.Extensions.Caching.Hybrid (4)
Microsoft.Extensions.Caching.Hybrid.Tests (8)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.Telemetry (2)
Microsoft.Gen.Logging.Generated.Tests (7)
Microsoft.Gen.Metrics.Generated.Tests (5)
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (7)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.ML.AutoML (4)
Microsoft.ML.Core (18)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.Data (31)
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);
Microsoft.ML.FastTree (14)
Microsoft.ML.ImageAnalytics (4)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.LightGbm (5)
Microsoft.ML.Mkl.Components (3)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.Parquet (1)
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)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tests (18)
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\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);
Microsoft.ML.Tokenizers (44)
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\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\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)
Microsoft.ML.Transforms (19)
Microsoft.NET.StringTools (1)
Microsoft.VisualBasic.Core (10)
Microsoft.VisualBasic.Forms (1)
Microsoft.VisualBasic.Forms.Tests (1)
MinimalValidationSample (2)
Mvc.RoutingWebSite (1)
PresentationBuildTasks (3)
PresentationCore (43)
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,
PresentationFramework (69)
ReachFramework (7)
Roslyn.Diagnostics.Analyzers (37)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Roslyn.Diagnostics.CSharp.Analyzers (1)
Shared.Tests (5)
Sockets.FunctionalTests (1)
System.Collections (2)
System.Collections.Concurrent (17)
System.Collections.Immutable (4)
System.ComponentModel.TypeConverter (3)
System.Configuration.ConfigurationManager (5)
System.Console (1)
System.Data.Common (13)
System.Data.Odbc (2)
System.Diagnostics.Process (4)
System.Drawing.Common.Tests (98)
mono\System.Drawing\GraphicsTests.cs (28)
1623SizeF sizeP = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MaxValue) : g.MeasureString(s, _font, int.MaxValue);
1656? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1657: g.MeasureString(text, _font, int.MaxValue, string_format);
1661? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1662: g.MeasureString(text, _font, int.MaxValue, string_format);
1666? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1667: g.MeasureString(text, _font, int.MaxValue, string_format);
1689? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1690: g.MeasureString(text, _font, int.MaxValue, string_format);
1694? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1695: g.MeasureString(text, _font, int.MaxValue, string_format);
1699? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1700: g.MeasureString(text, _font, int.MaxValue, string_format);
1720? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1721: g.MeasureString(text, _font, int.MaxValue, string_format);
1725? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1726: g.MeasureString(text, _font, int.MaxValue, string_format);
1730? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1731: g.MeasureString(text, _font, int.MaxValue, string_format);
1753? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1754: g.MeasureString(text, _font, int.MaxValue, string_format);
1758? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1759: g.MeasureString(text, _font, int.MaxValue, string_format);
1763? g.MeasureString(text.AsSpan(), _font, int.MaxValue, string_format)
1764: g.MeasureString(text, _font, int.MaxValue, string_format);
2542Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, int.MaxValue, int.MinValue));
2550Assert.Throws<OverflowException>(() => g.DrawImage(bmp, int.MaxValue, int.MinValue));
System\Drawing\FontTests.cs (5)
97yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue };
179yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter };
221yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter, 200 };
263yield return new object[] { FontFamily.GenericSerif, 16, (FontStyle)int.MaxValue, GraphicsUnit.Millimeter, 200, false };
565[InlineData(FontStyle.Strikeout | FontStyle.Underline | FontStyle.Bold | FontStyle.Italic, int.MaxValue, 1)]
System\Drawing\GraphicsTests.cs (8)
1528yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) };
1529yield return new object[] { int.MaxValue, int.MaxValue, 0, 0, new Size(1, 1) };
1531yield return new object[] { 0, 0, int.MaxValue, int.MaxValue, new Size(1, 1) };
1551[InlineData(0, 0, 0, 0, int.MaxValue, int.MaxValue)]
System\Drawing\Imaging\EncoderParameterTests.cs (7)
76[InlineData(int.MaxValue, int.MaxValue)]
303[InlineData(EncoderParameterValueType.ValueTypeShort, (int.MaxValue / 2) + 1, typeof(OverflowException))]
304[InlineData(EncoderParameterValueType.ValueTypeLong, (int.MaxValue / 4) + 1, typeof(OverflowException))]
305[InlineData(EncoderParameterValueType.ValueTypeRational, (int.MaxValue / 8) + 1, typeof(OverflowException))]
306[InlineData(EncoderParameterValueType.ValueTypeLongRange, (int.MaxValue / 8) + 1, typeof(OverflowException))]
307[InlineData(EncoderParameterValueType.ValueTypeRationalRange, (int.MaxValue / 16) + 1, typeof(OverflowException))]
System.Formats.Asn1 (5)
System.Formats.Cbor (1)
System.IO.Compression (1)
System.IO.Compression.Brotli (3)
System.IO.FileSystem.Watcher (1)
System.IO.Pipelines (2)
System.IO.Pipes (3)
System.IO.Ports (1)
System.Linq (12)
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.AsyncEnumerable (7)
System.Linq.Expressions (6)
System.Linq.Parallel (15)
System.Memory (9)
System.Memory.Data (3)
System.Net.Http (26)
System.Net.Http.Json (1)
System.Net.Ping (3)
System.Net.Primitives (4)
System.Net.Quic (2)
System.Net.Requests (1)
System.Net.Security (3)
System.Net.Sockets (6)
System.Net.WebClient (2)
System.Net.WebSockets (1)
System.Numerics.Tensors (6)
System.ObjectModel (1)
System.Private.CoreLib (179)
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (11)
235if (totalLength > int.MaxValue)
273if (totalLength > int.MaxValue)
418if (totalLengthLong > int.MaxValue)
1045if (totalSeparatorsLength > int.MaxValue)
1416if (dstLength > int.MaxValue)
1638return SplitInternal(new ReadOnlySpan<char>(in separator), int.MaxValue, options);
1657return SplitInternal(separator, int.MaxValue, StringSplitOptions.None);
1667return SplitInternal(separator, int.MaxValue, StringSplitOptions.None);
1688return SplitInternal(separator, int.MaxValue, options);
1740return SplitInternal(separator ?? Empty, null, int.MaxValue, options);
1750return SplitInternal(null, separator, int.MaxValue, options);
System.Private.DataContractSerialization (49)
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\Json\DataContractJsonSerializer.cs (2)
63: this(type, null, knownTypes, int.MaxValue, false, false)
77: this(type, rootName, knownTypes, int.MaxValue, false, false)
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.Private.Windows.Core (1)
System.Private.Windows.Core.Tests (6)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (5)
58new Point(-1, int.MaxValue),
60new Size(int.MaxValue, int.MinValue),
73new List<int> { int.MinValue, int.MaxValue },
93new int[] { int.MinValue, int.MaxValue },
115(ArrayList)([int.MinValue, int.MaxValue]),
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (34)
System.Reflection.Metadata (7)
System.Reflection.MetadataLoadContext (1)
System.Resources.Extensions (4)
System.Resources.Writer (2)
System.Runtime.Caching (9)
System.Runtime.InteropServices (1)
System.Runtime.Numerics (21)
System.Runtime.Serialization.Formatters (5)
System.Runtime.Serialization.Schema (2)
System.Security.Cryptography (20)
System.Security.Cryptography.Cose (1)
System.ServiceModel.Federation (2)
System.ServiceModel.Http.Tests (6)
System.ServiceModel.NetFramingBase (11)
System.ServiceModel.NetTcp.Tests (1)
System.ServiceModel.Primitives.Tests (9)
System.ServiceModel.Syndication (13)
System.ServiceModel.UnixDomainSocket.Tests (1)
System.Text.Encoding.CodePages (2)
System.Text.Json (153)
System.Text.RegularExpressions (85)
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (4)
148_anyStar = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: false);
149_anyStarLazy = SymbolicRegexNode<TSet>.CreateLoop(this, _anyChar, 0, int.MaxValue, isLazy: true);
217internal SymbolicRegexNode<TSet> CreateLoop(SymbolicRegexNode<TSet> node, bool isLazy, int lower = 0, int upper = int.MaxValue)
232if (!isLazy && lower == 0 && upper == int.MaxValue && node._kind == SymbolicRegexNodeKind.Singleton)
System.Text.RegularExpressions.Generator (60)
RegexGenerator.Emitter.cs (20)
1364Debug.Assert(target.LoopNode.N == int.MaxValue);
3490if (node.N != int.MaxValue)
3704Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
3948if (maxIterations != int.MaxValue || iterationMayBeEmpty)
3953if (maxIterations == int.MaxValue)
4153if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass)
4168string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
4176else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass)
4184else if (maxIterations == int.MaxValue && TryEmitIndexOf(requiredHelpers, node, useLast: false, negate: true, out _, out string? indexOfExpr))
4213if (minIterations != 0 || maxIterations != int.MaxValue)
4224string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
4298Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4318Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4444if (maxIterations == int.MaxValue && !iterationMayBeEmpty)
4461else if (minIterations > 0 && maxIterations == int.MaxValue)
4477else if (maxIterations == int.MaxValue)
5637(0, int.MaxValue) => " any number of times",
5638(1, int.MaxValue) => " at least once",
5639(2, int.MaxValue) => " at least twice",
5640(_, int.MaxValue) => $" at least {node.M} times",
System.Threading (13)
System.Threading.Channels (1)
System.Threading.Tasks.Dataflow (8)
System.Threading.Tasks.Parallel (4)
System.Windows.Controls.Ribbon (4)
System.Windows.Forms (53)
System.Windows.Forms.Design (29)
System.Windows.Forms.Design.Tests (9)
System.Windows.Forms.Interop.Tests (1)
System.Windows.Forms.Primitives.Tests (17)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Primitives.TestUtilities.Tests (2)
System.Windows.Forms.Tests (565)
System.Xaml (2)
Test.Utilities (32)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
Text.Analyzers (36)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (6)
47internal static int CombineValues<T>(IEnumerable<T>? values, int maxItemsToHash = int.MaxValue)
73internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
92internal static int CombineValues<T>(T[]? values, int maxItemsToHash = int.MaxValue)
116internal static int CombineValues<T>(ImmutableArray<T> values, int maxItemsToHash = int.MaxValue)
142internal static int CombineValues(IEnumerable<string?>? values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
167internal static int CombineValues(ImmutableArray<string> values, StringComparer stringComparer, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (1)
58var start = int.MaxValue;
VersioningWebSite (1)
WindowsBase.Tests (8)
WindowsFormsIntegration (10)
WinFormsControlsTest (3)