350 references to MaxValue
Aspire.Dashboard.Components.Tests (1)
Controls\PlotlyChartTests.cs (1)
76TimeUnixNano = long.MaxValue
BinaryFormatTests (4)
FormatTests\FormattedObject\ListTests.cs (2)
23long.MaxValue, 100new List<long>() { 0, -2, long.MinValue, long.MaxValue },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
41{ (byte)PrimitiveType.Int64, long.MaxValue }, 121long.MaxValue,
dotnet-svcutil-lib (13)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\SqlUtils.cs (1)
44internal static readonly ulong x_llMax = Int64.MaxValue; // Max of Int64
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3267private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(long.MinValue, long.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
895if (value < (decimal)Int64.MinValue || value > (decimal)Int64.MaxValue)
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDuration.cs (1)
367if (ticks == (ulong)Int64.MaxValue + 1)
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
291if (value <= long.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (2)
529if (value <= Int64.MaxValue) 781if (f >= long.MinValue && f <= long.MaxValue && (l = (long)f) == f)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (2)
581if (value > long.MaxValue / 10) 584if (value > long.MaxValue - digit)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Ticks.cs (4)
43if (firstTicks == long.MaxValue || firstTicks == long.MinValue) 47if (secondTicks == long.MaxValue || secondTicks == long.MinValue) 51if (firstTicks >= 0 && long.MaxValue - firstTicks <= secondTicks) 53return long.MaxValue - 1;
Extensibility.MessageInterceptor.IntegrationTests (4)
TimeoutHelper.cs (4)
178if (firstTicks == long.MaxValue || firstTicks == long.MinValue) 182if (secondTicks == long.MaxValue || secondTicks == long.MinValue) 186if (firstTicks >= 0 && long.MaxValue - firstTicks <= secondTicks) 188return long.MaxValue - 1;
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteJSRuntime.cs (1)
46_maximumIncomingBytes = componentHubOptions.Value.MaximumReceiveMessageSize ?? long.MaxValue;
Microsoft.AspNetCore.Components.Tests (2)
RenderTreeDiffBuilderTest.cs (1)
1748tree.AddComponentParameter(1, "MyLong", long.MaxValue);
Routing\RouteTableFactoryTests.cs (1)
382new object[] { "/{value:long}", "/9223372036854775807", long.MaxValue },
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
198new object[] {"long", "long.MaxValue", long.MaxValue, true },
Microsoft.AspNetCore.Mvc.Core.Test (3)
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
275{ long.MaxValue, int.MaxValue },
ModelBinding\ModelBindingHelperTest.cs (2)
986[InlineData(long.MaxValue, typeof(LongEnum), LongEnum.MaxValue)] 1590MaxValue = long.MaxValue
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
378[([Range(typeof(long), "-9223372036854775808", "9223372036854775807")] long id) => {}, (OpenApiSchema schema) => { Assert.Equal(long.MinValue.ToString(CultureInfo.InvariantCulture), schema.Minimum); Assert.Equal(long.MaxValue.ToString(CultureInfo.InvariantCulture), schema.Maximum); }],
Microsoft.AspNetCore.Routing.Tests (1)
Constraints\RangeRouteConstraintTests.cs (1)
12[InlineData(long.MinValue, long.MaxValue, 2, true)]
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Internal\Http2\Http2KeepAlive.cs (2)
38_keepAliveTimeout = keepAliveTimeout == TimeSpan.MaxValue ? long.MaxValue 78if (_keepAliveTimeout != long.MaxValue)
Internal\Http3\Http3Connection.cs (2)
270stream.StreamTimeoutTimestamp = expiration >= 0 ? expiration : long.MaxValue; 290stream.StreamTimeoutTimestamp = expiration >= 0 ? expiration : long.MaxValue;
Internal\Infrastructure\ResourceCounter.cs (1)
45while (count < _max && count != long.MaxValue)
Internal\Infrastructure\TimeExtensions.cs (1)
19return long.MaxValue;
Internal\Infrastructure\TimeoutControl.cs (6)
17private long _timeoutTimestamp = long.MaxValue; 80if (Interlocked.Read(ref _timeoutTimestamp) != long.MaxValue) 169Debug.Assert(_timeoutTimestamp == long.MaxValue, "Concurrent timeouts are not supported."); 181Interlocked.Exchange(ref _timeoutTimestamp, long.MaxValue); 318if (_timeoutTimestamp != long.MaxValue) 340gracePeriod = gracePeriod >= 0 ? gracePeriod : long.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
HttpHeadersTests.cs (3)
266httpHeaders.ContentLength = long.MaxValue; 268Assert.Equal(HeaderUtilities.FormatNonNegativeInt64(long.MaxValue), value[0]); 269Assert.Equal(long.MaxValue, httpHeaders.ContentLength);
HttpResponseHeadersTests.cs (1)
423long.MaxValue.ToString(CultureInfo.InvariantCulture)
KestrelServerLimitsTests.cs (4)
33[InlineData(long.MaxValue)] 218[InlineData(long.MaxValue)] 243[InlineData(long.MaxValue)] 274[InlineData(long.MaxValue)]
ResourceCounterTests.cs (2)
51var counter = new ResourceCounter.FiniteCounter(long.MaxValue); 52counter.Count = long.MaxValue;
Microsoft.Build (5)
BackEnd\Components\Scheduler\Scheduler.cs (1)
1064long sizeOfSmallestSourceFile = long.MaxValue;
Evaluation\Expander\ArgumentParser.cs (1)
217if (d >= long.MinValue && d <= long.MaxValue)
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (3)
19private long _maxAllowedPosition = long.MaxValue; 58set { _maxAllowedPosition = value.HasValue ? _position + value.Value : long.MaxValue; } 63_maxAllowedPosition == long.MaxValue ? 0 : (int)(_maxAllowedPosition - _position);
Microsoft.Build.Engine.UnitTests (17)
Evaluation\Expander_Tests.cs (4)
4631TestPropertyFunction("$([MSBuild]::Add($(X), 1))", "X", long.MaxValue.ToString(), expected); 4638double value = long.MaxValue + 1.0; 4666TestPropertyFunction("$([MSBuild]::Subtract($(X), 9223372036854775806))", "X", long.MaxValue.ToString(), expected); 4686TestPropertyFunction("$([MSBuild]::Multiply($(X), 2))", "X", long.MaxValue.ToString(), expected);
Evaluation\ExpanderFunction_Tests.cs (6)
156_ = Should.NotThrow(() => ParseArgs.TryConvertToLong((double)long.MaxValue, out _)); 162const long longMaxValue = long.MaxValue; 173const long longMaxValue = long.MaxValue; 186const long veryLargeLong = long.MaxValue - 512; 204const double value = (double)long.MaxValue + long.MaxValue;
Evaluation\IntrinsicFunctionOverload_Tests.cs (7)
26string expected = unchecked(long.MaxValue + 1).ToString(); 48string expected = ((long.MaxValue + 1D) + 1).ToString(); 134string expected = ((long.MaxValue + 1D) - 1).ToString(); 200string expected = unchecked(long.MaxValue * 2).ToString(); 220string expected = ((long.MaxValue + 1D) * 1).ToString(); 306string expected = ((long.MaxValue + 1D) / 1).ToString(); 392string expected = ((long.MaxValue + 1D) % 1).ToString();
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
419public override long Length => long.MaxValue;
Microsoft.CodeAnalysis (2)
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (1)
210&& endConstant.Int64Value == Int64.MaxValue;
EnumConstantHelper.cs (1)
93overflowKind = CheckOverflow(long.MaxValue, previous, offset);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
70{ long.MaxValue, nameof(long.MaxValue) },
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder_Conversions.cs (4)
3614case SpecialType.System_Int64: return (long.MinValue - 1D) <= value && value < (long.MaxValue + 1D); 3617maySucceedAtRuntime = (long.MinValue - 1D) < value && value < (long.MaxValue + 1D); 3643case SpecialType.System_Int64: return (long.MinValue - 1M) < value && value < (long.MaxValue + 1M); 3645maySucceedAtRuntime = (long.MinValue - 1M) < value && value < (long.MaxValue + 1M);
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
108else if (scale == 0 && long.MinValue <= value && value <= long.MaxValue)
Parser\Lexer.cs (2)
1105else if (val <= Int64.MaxValue) 1137if (val <= Int64.MaxValue)
Utilities\ValueSetFactory.LongTC.cs (2)
20long INumericTC<long>.MaxValue => long.MaxValue; 45Debug.Assert(value != long.MaxValue);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
160var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenIncrementTests.cs (1)
78TestIncrementCompilationAndOutput<long>(long.MaxValue, long.MinValue);
Emit\EmitMetadataTests.cs (1)
3062foreach (var feature in new[] { "true", "false", "", "-1", long.MaxValue.ToString() })
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
9396string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NativeIntegerTests.cs (1)
13761string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetSemanticInfoTests.cs (4)
940EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)long.MaxValue)); 941EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 942EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
LexicalAndXml\LexicalTests.cs (5)
2645var value = ((ulong)Int64.MaxValue) + 1; 2676var text = Int64.MaxValue.ToString() + "L"; 2684Assert.Equal(Int64.MaxValue, token.Value); 2691var text = (((ulong)Int64.MaxValue) + 1).ToString() + "L"; 2699Assert.Equal((ulong)Int64.MaxValue + 1, token.Value);
Syntax\SyntaxFactoryTests.cs (1)
343CheckLiteralToString(long.MaxValue, @"9223372036854775807L");
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
160var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
76VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(long.MaxValue), "global::System.Int64.MaxValue");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\BloomFilterTests.cs (1)
151var bloomFilter = new BloomFilter(0.001, ["Hello, World"], [long.MaxValue, -1, 0, 1, long.MinValue]);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\OperationTestAnalyzer.cs (1)
339long minCaseValue = long.MaxValue;
Microsoft.CodeAnalysis.UnitTests (3)
CorLibTypesTests.cs (2)
205var cv71 = ConstantValue.Create(long.MaxValue); 206var cv72 = ConstantValue.Create(long.MaxValue);
RealParserTests.cs (1)
188TestRoundTripDouble((double)long.MaxValue);
Microsoft.CodeAnalysis.VisualBasic (1)
Scanner\Scanner.vb (1)
2019If TypeCharacter <> TypeCharacter.ULongLiteral AndAlso integralValue > Long.MaxValue Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (2)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue 259Dim valueIsOutOfRange = d > Long.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.vb (1)
80CheckLiteralToString(Long.MaxValue, "9223372036854775807L")
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (2)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue 259Dim valueIsOutOfRange = d > Long.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
72VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Long.MaxValue), "Global.System.Int64.MaxValue")
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
70{ long.MaxValue, nameof(long.MaxValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
ObjectSerializationTests.cs (6)
284TestRoundTripValue(Int64.MaxValue); 375TestRoundTripValue<Int64>(Int64.MaxValue); 419writer.WriteInt64(Int64.MaxValue); 443Assert.Equal(Int64.MaxValue, reader.ReadInt64()); 473writer.WriteScalarValue(Int64.MaxValue); 511Assert.Equal(Int64.MaxValue, (Int64)reader.ReadScalarValue());
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1539if (value <= long.MaxValue)
Microsoft.Data.Analysis (4)
IDataView.Extension.cs (1)
49maxRows = maxRows == -1 ? long.MaxValue : maxRows;
PrimitiveDataFrameColumnComputations.cs (3)
3282var ret = long.MaxValue; 3499var value = long.MaxValue; 3522var value = long.MaxValue;
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Windows\WindowsSnapshotProviderTests.cs (1)
170Assert.InRange(usage, 0, long.MaxValue);
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (1)
95public long LongProperty { get; set; } = long.MaxValue;
Microsoft.Maui.Controls (2)
Tweener.cs (2)
62 _ = _step.Invoke(long.MaxValue); 114 if (step == long.MaxValue)
Microsoft.ML.Core (5)
Data\DataKind.cs (2)
183return long.MaxValue; 210return long.MaxValue;
Utilities\DoubleParser.cs (1)
704const long eMax = long.MaxValue / 100;
Utilities\OrderedWaiter.cs (2)
108if (_currCleared < long.MaxValue) 124_currCleared = long.MaxValue;
Microsoft.ML.Core.Tests (1)
UnitTests\DataTypes.cs (1)
200var maxValue = long.MaxValue;
Microsoft.ML.Data (10)
Data\Conversion.cs (3)
1277TryParseSigned(I8.MaxValue, in src, out long? res); 1367Contracts.Assert(0 <= result && result <= long.MaxValue); 1477TryParseSigned(I8.MaxValue, in src, out long? res);
DataLoadSave\Binary\BinaryLoader.cs (1)
349ch.CheckDecode(ublockSize <= long.MaxValue, "Metadata block size out of range");
DataLoadSave\Binary\CodecFactory.cs (1)
164Contracts.CheckDecode(ulen <= long.MaxValue, "Codec type definition read from stream too large");
DataLoadSave\Text\TextLoader.cs (1)
1197_maxRows = options.MaxRows ?? long.MaxValue;
DataLoadSave\Text\TextLoaderCursor.cs (1)
350_batch = long.MaxValue;
DataView\CacheDataView.cs (1)
234_cacheDefaultWaiter.Wait(long.MaxValue);
Transforms\SkipTakeFilter.cs (2)
53internal const long DefaultTake = long.MaxValue; 269if (1 > long.MaxValue - _skip)
Microsoft.ML.FastTree (2)
Dataset\IntArray.cs (2)
327long segBits = long.MaxValue; 340rleBits = long.MaxValue;
Microsoft.ML.SearchSpace.Tests (2)
ParameterTest.cs (2)
80parameter = Parameter.FromLong(long.MaxValue); 81parameter.AsType<long>().Should().Be(long.MaxValue);
Microsoft.ML.Tests (8)
CollectionsDataViewTest.cs (2)
120fLong = long.MaxValue - 1, 135fLong = long.MaxValue,
TextLoaderTests.cs (2)
36string.Format("{0},{1},{2},{3}", sbyte.MaxValue, short.MaxValue, int.MaxValue, long.MaxValue), 57long[] longTargets = new long[] { long.MinValue, long.MaxValue, default };
Transformers\ConvertTests.cs (3)
161AK = new long[]{ long.MinValue, long.MaxValue}, 229AK = new long[]{ long.MinValue, long.MaxValue}, 241ConvK = new float[] { long.MinValue, long.MaxValue },
Transformers\HashTests.cs (1)
265if (value <= long.MaxValue)
Microsoft.ML.Transforms (5)
Expression\BuiltinFunctions.cs (3)
1054return neg ? I8.MinValue : I8.MaxValue; 1068return neg ? I8.MinValue : I8.MaxValue; 1090return neg ? I8.MinValue : I8.MaxValue;
Expression\Node.cs (1)
787else if (uu <= I8.MaxValue || ilt.IsHex && !uns)
UngroupTransform.cs (1)
158if (srcRowCount.HasValue && srcRowCount.Value <= (long.MaxValue / commonSize))
Microsoft.Net.Http.Headers.Tests (2)
HeaderUtilitiesTest.cs (2)
103[InlineData(long.MaxValue)] 125[InlineData(long.MaxValue)]
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (1)
3037If DecimalResult < Int64.MinValue OrElse DecimalResult > Int64.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (1)
3786If result > Int64.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
195Val = Int64.MaxValue + Val + 1
PresentationBuildTasks (2)
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
796if (index == Int64.MaxValue) 810if (index < Int64.MaxValue)
PresentationCore (2)
MS\Internal\IO\Packaging\NetStream.cs (1)
1064&& (_highWaterMark <= Int64.MaxValue - (long) _additionalRequestThreshold) // Ensure that we don't get overflow from the next line
System\Windows\Media\Animation\TimeIntervalCollection.cs (1)
886periodInTicks = Int64.MaxValue / 2;
PresentationFramework (3)
System\Windows\Documents\Speller.cs (1)
1476ScanRange(start, end, Int64.MaxValue /* timeLimit */);
System\Windows\Markup\BamlRecordReader.cs (1)
250bamlRecord = ReadNextRecordWithDebugExtension(Int64.MaxValue, recordType);
System\Windows\TriggerBase.cs (1)
356if( _nextGlobalLayerRank == Int64.MaxValue )
ScenarioTests.Common.Tests (2)
ScenarioTestHelpers.cs (2)
123LongValue = long.MaxValue, 165LongValue = long.MaxValue,
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
100Tuple.Create((long?)long.MaxValue, false),
System.Configuration.ConfigurationManager (1)
System\Configuration\LongValidatorAttribute.cs (1)
9private long _max = long.MaxValue;
System.Data.Common (10)
System\Data\Common\Int64Storage.cs (1)
105long min = long.MaxValue;
System\Data\Common\TimeSpanStorage.cs (2)
130if (stDev > long.MaxValue) 132stDev = long.MaxValue;
System\Data\SQLTypes\SQLDecimal.cs (1)
61internal const ulong s_llMax = long.MaxValue; // Max of Int64
System\Data\SQLTypes\SQLInt64.cs (5)
166if (lPartialResult < 0 || lPartialResult > long.MaxValue) 173if (lPartialResult < 0 || lPartialResult > long.MaxValue) 270if (value > long.MaxValue || value < long.MinValue) 283if (value > long.MaxValue || value < long.MinValue) 601public static readonly SqlInt64 MaxValue = new SqlInt64(long.MaxValue);
System\Data\SQLTypes\SQLMoney.cs (1)
90if (fPositive && ulValue > long.MaxValue ||
System.Data.Odbc (2)
src\libraries\Common\src\System\Data\ProviderBase\TimeoutTimer.cs (2)
129return (_isInfiniteTimeout) ? long.MaxValue : _timerExpire; 149milliseconds = long.MaxValue;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesSamplerBuilder.cs (2)
17? long.MaxValue 18: (long)(ratio * long.MaxValue);
System.Diagnostics.Process (2)
System\Diagnostics\Process.Linux.cs (2)
235if (rsslim > long.MaxValue) 236rsslim = long.MaxValue;
System.Drawing.Common.Tests (1)
System\Drawing\Imaging\EncoderParameterTests.cs (1)
68[InlineData(long.MaxValue)]
System.Formats.Asn1 (3)
System\Formats\Asn1\AsnDecoder.Integer.cs (2)
287/// <see cref="long.MinValue">Int64.MinValue</see> and <see cref="long.MaxValue">Int64.MaxValue</see>, inclusive; otherwise, 682/// <see cref="long.MinValue">Int64.MinValue</see> and <see cref="long.MaxValue">Int64.MaxValue</see>, inclusive; otherwise
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
293Debug.Assert(firstIdentifier > long.MaxValue);
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.Integer.cs (1)
32ulong unsignedRepresentation = (value == long.MinValue) ? (ulong)long.MaxValue : (ulong)(-value) - 1;
System.IO.Compression (7)
System\IO\Compression\ZipArchive.cs (5)
198_firstDeletedEntryOffset = long.MaxValue; 651if (locator == null || locator.OffsetOfZip64EOCD > long.MaxValue) 663if (record.NumberOfEntriesTotal > long.MaxValue) 666if (record.OffsetOfCentralDirectory > long.MaxValue) 740if (startingOffset == long.MaxValue)
System\IO\Compression\ZipArchiveEntry.cs (2)
1639long xOffset = x != null && !x.OriginallyInArchive ? long.MaxValue : x?.OffsetOfLocalHeader ?? long.MinValue; 1640long yOffset = y != null && !y.OriginallyInArchive ? long.MaxValue : y?.OffsetOfLocalHeader ?? long.MinValue;
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
426return long.MaxValue; 434return long.MaxValue;
System.Linq.AsyncEnumerable (6)
System\Linq\AverageAsync.cs (4)
18/// <exception cref="OverflowException">The sum of the elements in the sequence is larger than <see cref="long.MaxValue"/> (via the returned task).</exception> 53/// <exception cref="OverflowException">The sum of the elements in the sequence is larger than <see cref="long.MaxValue"/> (via the returned task).</exception> 187/// <exception cref="OverflowException">The sum of the elements in the sequence is larger than <see cref="long.MaxValue"/> (via the returned task).</exception> 219/// <exception cref="OverflowException">The sum of the elements in the sequence is larger than <see cref="long.MaxValue"/> (via the returned task).</exception>
System\Linq\SumAsync.cs (2)
44/// <exception cref="OverflowException">The sum is larger than <see cref="long.MaxValue"/>.</exception> 174/// <exception cref="OverflowException">The sum is larger than <see cref="long.MaxValue"/>.</exception>
System.Linq.Expressions (1)
System\Linq\Expressions\Compiler\ILGen.cs (1)
1017if (value <= long.MaxValue)
System.Linq.Parallel (7)
System\Linq\ParallelEnumerable.cs (7)
1912/// The number of elements in source is larger than <see cref="long.MaxValue"/>. 1950/// The number of elements in source is larger than <see cref="long.MaxValue"/>. 2025/// The sum is larger than <see cref="long.MaxValue"/>. 2048/// The sum is larger than <see cref="long.MaxValue"/>. 2251/// The sum is larger than <see cref="long.MaxValue"/>. 2275/// The sum is larger than <see cref="long.MaxValue"/>. 3789/// The sum or count of the elements in the sequence is larger than <see cref="long.MaxValue"/>.
System.Memory (2)
System\Buffers\ReadOnlySequence.Helpers.cs (2)
601Debug.Assert(start <= long.MaxValue); 602Debug.Assert(end <= long.MaxValue);
System.Net.Http (5)
System\Net\Http\Headers\RetryConditionHeaderValue.cs (1)
12private const long DeltaNotSetTicksSentinel = long.MaxValue;
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
271long prevRtt = _minRtt == 0 ? long.MaxValue : _minRtt;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
119_firstRejectedStreamId = long.MaxValue; 391_firstRejectedStreamId = long.MaxValue;
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (1)
111long oldestFailedProxyTicks = long.MaxValue;
System.Net.HttpListener (1)
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
228ulong.TryParse(val, out ulong parsedUlongContentLength) ? (parsedUlongContentLength <= long.MaxValue ? (long)parsedUlongContentLength : 0) :
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Statistics.cs (1)
458return (long)Math.Min(long.MaxValue, ulong.Parse(value, CultureInfo.InvariantCulture));
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
178PingTimeoutTimestamp = long.MaxValue;
System.Numerics.Tensors (6)
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (3)
75Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue); 100Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue); 125Vector512<ulong> sign = x.AsUInt64() & Vector512.Create(~(ulong)long.MaxValue);
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (3)
80Vector128<ulong> sign = x.AsUInt64() & Vector128.Create(~(ulong)long.MaxValue); 102Vector256<ulong> sign = x.AsUInt64() & Vector256.Create(~(ulong)long.MaxValue); 124Vector512<ulong> sign = x.AsUInt64() & Vector512.Create(~(ulong)long.MaxValue);
System.Private.CoreLib (55)
src\libraries\System.Private.CoreLib\src\System\AppDomain.Unix.cs (2)
16if (userTime100Nanoseconds > long.MaxValue) 18userTime100Nanoseconds = long.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.N.cs (2)
338if (((ulong)answer) > long.MaxValue / 10) 345if ((ulong)answer > (ulong)(long.MaxValue + (-1 * sign + 1) / 2))
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.cs (2)
124const long MaxMilliSeconds = long.MaxValue / TimeSpan.TicksPerMillisecond; 165if (ticksWithoutFraction > long.MaxValue - fraction)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1767long actualResult = (value >= long.MaxValue) ? long.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
177if (timeStamp == long.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Environment.UnixOrBrowser.cs (2)
90ulong userTime100Nanoseconds = Math.Min(cpuInfo.lastRecordedUserTime / 100, (ulong)long.MaxValue); 91ulong kernelTime100Nanoseconds = Math.Min(cpuInfo.lastRecordedKernelTime / 100, (ulong)long.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (1)
607const long MaxMilliSeconds = long.MaxValue / TimeSpan.TicksPerMillisecond;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (14)
626static long IMinMaxValue<long>.MaxValue => MaxValue; 1002result = (actualValue >= MaxValue) ? MaxValue : 1009result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1028result = (actualValue >= MaxValue) ? MaxValue : 1047result = (actualValue >= MaxValue) ? MaxValue : 1078result = (actualValue >= MaxValue) ? MaxValue : 1085result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1122result = (actualValue >= MaxValue) ? MaxValue : 1446static long IBinaryIntegerParseAndFormatInfo<long>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (15)
172get => unchecked((nint)nint_t.MaxValue); 997result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1004result = (actualValue == Half.PositiveInfinity) ? unchecked((nint)nint_t.MaxValue) : 1023result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1030result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1043result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1074result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1081result = (actualValue == Half.PositiveInfinity) ? unchecked((nint)nint_t.MaxValue) : 1118result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) :
src\libraries\System.Private.CoreLib\src\System\Random.CompatImpl.cs (2)
55if (result != long.MaxValue) 176if (result != long.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
103/// <returns>A 64-bit signed integer that is greater than or equal to 0 and less than <see cref="long.MaxValue"/>.</returns> 107AssertInRange(result, 0, long.MaxValue); 517AssertInRange(result, 0, long.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Random.Xoshiro256StarStarImpl.cs (1)
113if (result != long.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1707long actualResult = (value >= long.MaxValue) ? long.MaxValue :
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
214internal const long MaxTicks = long.MaxValue; // +9,223,372,036,854,775,807
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1882long actualResult = (value >= new UInt128(0x0000_0000_0000_0000, 0x7FFF_FFFF_FFFF_FFFF)) ? long.MaxValue : (long)value;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1054long actualResult = (value >= long.MaxValue) ? long.MaxValue : (long)value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1057long actualResult = (value >= long.MaxValue) ? long.MaxValue : (long)value;
System.Private.DataContractSerialization (4)
System\Xml\ValueHandle.cs (1)
276if (value <= long.MaxValue)
System\Xml\XmlBinaryWriter.cs (1)
502if (value <= long.MaxValue)
System\Xml\XmlConverter.cs (2)
545if (value > long.MaxValue / 10) 548if (value > long.MaxValue - digit)
System.Private.Windows.Core.Tests (4)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
75new List<long> { long.MinValue, long.MaxValue }, 95new long[] { long.MinValue, long.MaxValue },
System\Value\StoringEnum.cs (1)
172MaxValue = long.MaxValue
System\Value\StoringLong.cs (1)
12{ long.MaxValue },
System.Private.Xml (4)
System\Xml\BinaryXml\SqlUtils.cs (1)
38internal const ulong x_llMax = long.MaxValue; // Max of Int64
System\Xml\Schema\DataTypeImplementation.cs (1)
3205private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(long.MinValue, long.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
810if (value < (decimal)long.MinValue || value > (decimal)long.MaxValue)
System\Xml\Schema\XsdDuration.cs (1)
307if (ticks == (ulong)long.MaxValue + 1)
System.Runtime.Numerics (6)
System\Numerics\BigInteger.cs (2)
4749long actualResult = (value >= long.MaxValue) ? long.MaxValue :
System\Numerics\Complex.cs (4)
1873long actualResult = (value.m_real >= long.MaxValue) ? long.MaxValue : 2009long actualResult = (value.m_real >= long.MaxValue) ? long.MaxValue :
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
33ulong unsignedRepresentation = (value == long.MinValue) ? (ulong)long.MaxValue : (ulong)(-value) - 1; 228if (cborNegativeIntRepresentation > long.MaxValue)
System.ServiceModel.NetTcp.Tests (2)
ServiceModel\NetTcpBindingTest.cs (2)
44[InlineData(Int64.MaxValue)] 73[InlineData(Int64.MaxValue)]
System.ServiceModel.UnixDomainSocket.Tests (2)
ServiceModel\UnixDomainSocketBindingTest.cs (2)
45[InlineData(Int64.MaxValue)] 74[InlineData(Int64.MaxValue)]
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
445/// than <see cref="long.MaxValue"/>.
System.Threading.RateLimiting (3)
System\Threading\RateLimiting\ChainedPartitionedRateLimiter.cs (1)
30long lowestAvailablePermits = long.MaxValue;
System\Threading\RateLimiting\ChainedRateLimiter.cs (1)
28long lowestAvailablePermits = long.MaxValue;
System\Threading\RateLimiting\NoopLimiter.cs (1)
23CurrentAvailablePermits = long.MaxValue,
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlockOptions.cs (1)
445get { return (_maxNumberOfGroups == Unbounded) ? long.MaxValue : _maxNumberOfGroups; }
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\TaskReplicator.cs (2)
138long timeout = long.MaxValue - 1; 151new Replica<TState>(replicator, maxConcurrencyLevel, timeout: long.MaxValue, action).Start();
System.Transactions.Local (6)
System\Transactions\InternalTransaction.cs (2)
256_absoluteTimeout = long.MaxValue; 274_absoluteTimeout = long.MaxValue;
System\Transactions\TransactionState.cs (1)
2163if (tx.AbsoluteTimeout == long.MaxValue)
System\Transactions\TransactionTable.cs (3)
162_headBucketSet = new BucketSet(this, long.MaxValue); 192return long.MaxValue; 233if (txNew.AbsoluteTimeout != long.MaxValue)
System.Windows.Forms (1)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
774maxDigits = (int)Math.Floor(Math.Log(long.MaxValue, baseSize));
System.Windows.Forms.Primitives.Tests (11)
Interop\Oleaut32\VARIANTTests.cs (11)
186yield return new object[] { VT_I1, unchecked((nint)long.MaxValue), (sbyte)(-1) }; 216yield return new object[] { VT_I2, unchecked((nint)long.MaxValue), (short)(-1) }; 247yield return new object[] { VT_I4, unchecked((nint)long.MaxValue), -1 }; 278yield return new object[] { VT_INT, unchecked((nint)long.MaxValue), -1 }; 313yield return new object[] { VT_ERROR, unchecked((nint)long.MaxValue), -1 }; 406yield return new object[] { unchecked((nint)long.MaxValue), long.MaxValue }; 430yield return new object[] { long.MaxValue }; 696yield return new object[] { unchecked((nint)long.MaxValue), -1 }; 1056yield return new object[] { long.MaxValue, (decimal)long.MaxValue };
System.Windows.Forms.Tests (1)
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
94long.MaxValue,
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\InertiaProcessor2D.cs (1)
756timeDelta = Int64.MaxValue;