195 references to MaxValue
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteJSRuntime.cs (1)
46_maximumIncomingBytes = componentHubOptions.Value.MaximumReceiveMessageSize ?? long.MaxValue;
Microsoft.AspNetCore.Components.Tests (2)
RenderTreeDiffBuilderTest.cs (1)
1745tree.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.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)
33_keepAliveTimeout = keepAliveTimeout == TimeSpan.MaxValue ? long.MaxValue 73if (_keepAliveTimeout != long.MaxValue)
Internal\Http3\Http3Connection.cs (2)
264stream.StreamTimeoutTimestamp = expiration >= 0 ? expiration : long.MaxValue; 284stream.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) 170Debug.Assert(_timeoutTimestamp == long.MaxValue, "Concurrent timeouts are not supported."); 182Interlocked.Exchange(ref _timeoutTimestamp, long.MaxValue); 319if (_timeoutTimestamp != long.MaxValue) 341gracePeriod = 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)
418long.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)
1068long sizeOfSmallestSourceFile = long.MaxValue;
Evaluation\Expander.cs (1)
4677if (d >= long.MinValue && d <= long.MaxValue)
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (3)
17private long _maxAllowedPosition = long.MaxValue; 56set { _maxAllowedPosition = value.HasValue ? _position + value.Value : long.MaxValue; } 61_maxAllowedPosition == long.MaxValue ? 0 : (int)(_maxAllowedPosition - _position);
Microsoft.Build.Engine.UnitTests (20)
Evaluation\Expander_Tests.cs (6)
4574string expected = IsIntrinsicFunctionOverloadsEnabled ? "-9223372036854775808" : (long.MaxValue + 1.0).ToString(); 4575TestPropertyFunction("$([MSBuild]::Add($(X), 1))", "X", long.MaxValue.ToString(), expected); 4582double value = long.MaxValue + 1.0; 4610TestPropertyFunction("$([MSBuild]::Subtract($(X), 9223372036854775806))", "X", long.MaxValue.ToString(), expected); 4629string expected = IsIntrinsicFunctionOverloadsEnabled ? "-2" : (long.MaxValue * 2.0).ToString(); 4630TestPropertyFunction("$([MSBuild]::Multiply($(X), 2))", "X", long.MaxValue.ToString(), expected);
Evaluation\ExpanderFunction_Tests.cs (5)
162_ = Should.NotThrow(() => Expander<IProperty, IItem>.Function<IProperty>.TryConvertToLong((double)long.MaxValue, out _)); 168const long longMaxValue = long.MaxValue; 189const long veryLargeLong = long.MaxValue - 512; 207const double value = (double)long.MaxValue + long.MaxValue;
Evaluation\IntrinsicFunctionOverload_Tests.cs (9)
35string expected = isIntrinsicFunctionOverloadsEnabled ? unchecked(long.MaxValue + 1).ToString() : (long.MaxValue + 1.0).ToString(); 61string expected = ((long.MaxValue +1D) + 1).ToString(); 152string expected = ((long.MaxValue + 1D) - 1).ToString(); 217string expected = isIntrinsicFunctionOverloadsEnabled ? unchecked(long.MaxValue * 2).ToString() : (long.MaxValue * 2.0).ToString(); 243string expected = ((long.MaxValue + 1D) * 1).ToString(); 334string expected = ((long.MaxValue + 1D) / 1).ToString(); 425string expected = ((long.MaxValue + 1D) % 1).ToString();
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1511if (value <= long.MaxValue)
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)
806if (index == Int64.MaxValue) 820if (index < Int64.MaxValue)
PresentationCore (2)
MS\Internal\IO\Packaging\NetStream.cs (1)
1075&& (_highWaterMark <= Int64.MaxValue - (long) _additionalRequestThreshold) // Ensure that we don't get overflow from the next line
System\Windows\Media\Animation\TimeIntervalCollection.cs (1)
892periodInTicks = Int64.MaxValue / 2;
PresentationFramework (3)
System\Windows\Documents\Speller.cs (1)
1509ScanRange(start, end, Int64.MaxValue /* timeLimit */);
System\Windows\Markup\BamlRecordReader.cs (1)
266bamlRecord = ReadNextRecordWithDebugExtension(Int64.MaxValue, recordType);
System\Windows\TriggerBase.cs (1)
366if( _nextGlobalLayerRank == Int64.MaxValue )
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
100Tuple.Create((long?)long.MaxValue, false),
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.Diagnostics.Process (2)
System\Diagnostics\Process.Linux.cs (2)
231if (rsslim > long.MaxValue) 232rsslim = long.MaxValue;
System.Formats.Asn1 (3)
System\Formats\Asn1\AsnDecoder.Integer.cs (2)
287/// <see cref="long.MinValue"/> and <see cref="long.MaxValue"/>, inclusive; otherwise, 682/// <see cref="long.MinValue"/> and <see cref="long.MaxValue"/>, inclusive; otherwise
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
256Debug.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 (3)
System\IO\Compression\ZipArchive.cs (3)
600if (locator.OffsetOfZip64EOCD > long.MaxValue) 615if (record.NumberOfEntriesTotal > long.MaxValue) 618if (record.OffsetOfCentralDirectory > long.MaxValue)
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
426return long.MaxValue; 434return long.MaxValue;
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)
107_firstRejectedStreamId = long.MaxValue; 286_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)
459return (long)Math.Min(long.MaxValue, ulong.Parse(value, CultureInfo.InvariantCulture));
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 (53)
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)
136const long MaxMilliSeconds = long.MaxValue / TimeSpan.TicksPerMillisecond; 177if (ticksWithoutFraction > long.MaxValue - fraction)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1773long actualResult = (value >= long.MaxValue) ? long.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
213if (timeStamp == 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)
630static long IMinMaxValue<long>.MaxValue => MaxValue; 1006result = (actualValue >= MaxValue) ? MaxValue : 1013result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1032result = (actualValue >= MaxValue) ? MaxValue : 1051result = (actualValue >= MaxValue) ? MaxValue : 1082result = (actualValue >= MaxValue) ? MaxValue : 1089result = (actualValue == Half.PositiveInfinity) ? MaxValue : 1126result = (actualValue >= MaxValue) ? MaxValue : 1450static long IBinaryIntegerParseAndFormatInfo<long>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (15)
172get => unchecked((nint)nint_t.MaxValue); 1017result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1024result = (actualValue == Half.PositiveInfinity) ? unchecked((nint)nint_t.MaxValue) : 1043result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1050result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1063result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1094result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.MaxValue) : 1101result = (actualValue == Half.PositiveInfinity) ? unchecked((nint)nint_t.MaxValue) : 1138result = (actualValue >= nint_t.MaxValue) ? unchecked((nint)nint_t.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); 416AssertInRange(result, 0, long.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Random.Net5CompatImpl.cs (2)
46if (result != long.MaxValue) 161if (result != 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)
1708long actualResult = (value >= long.MaxValue) ? long.MaxValue :
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
86internal const long MaxTicks = long.MaxValue; // +9,223,372,036,854,775,807
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1905long 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)
1058long actualResult = (value >= long.MaxValue) ? long.MaxValue : (long)value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1077long 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.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)
4707long actualResult = (value >= long.MaxValue) ? long.MaxValue :
System\Numerics\Complex.cs (4)
1902long actualResult = (value.m_real >= long.MaxValue) ? long.MaxValue : 2038long 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.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
445/// than <see cref="long.MaxValue"/>.
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\ChainedPartitionedRateLimiter.cs (1)
29long 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.Input.Manipulations (1)
System\Windows\Input\Manipulations\InertiaProcessor2D.cs (1)
760timeDelta = Int64.MaxValue;