144 references to MinValue
Aspire.Dashboard (2)
Otlp\Storage\SqliteTelemetryRepository.Traces.Writes.cs (2)
592long.MinValue, 1139long.MinValue,
Aspire.Hosting.Kubernetes (3)
KubernetesManifestResource.cs (3)
194if (decimal.Truncate(value) == value && value >= long.MinValue && value <= long.MaxValue) 204if (value < long.MinValue || value >= MaxLongExclusiveAsDouble) 206throw new ArgumentException($"Whole-number manifest field values must be between {long.MinValue} and {long.MaxValue}.", nameof(value));
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
872return decimal.ToInt64(ReadIntegralNumericValue(value, underlyingType, long.MinValue, long.MaxValue));
dotnet-svcutil-lib (10)
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)
369result = new TimeSpan(Int64.MinValue);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
781if (f >= long.MinValue && f <= long.MaxValue && (l = (long)f) == f)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (2)
566if (value < long.MinValue / 10) 569if (value < long.MinValue + digit)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Ticks.cs (4)
43if (firstTicks == long.MaxValue || firstTicks == long.MinValue) 47if (secondTicks == long.MaxValue || secondTicks == long.MinValue) 55if (firstTicks <= 0 && long.MinValue - firstTicks >= secondTicks) 57return long.MinValue + 1;
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
ILCompiler.Compiler (1)
Compiler\TypePreinit.cs (1)
1494&& value1.Value.AsInt64() == long.MinValue && value2.Value.AsInt64() == -1)
Microsoft.Analyzers.Local.Tests (3)
JsonValueTest.cs (3)
95Assert.Equal(int.MinValue, new JsonValue(long.MinValue).AsInteger); 218Assert.Equal(0, (int)new JsonValue(long.MinValue)); 224Assert.Equal(0, (int?)new JsonValue(long.MinValue));
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\ResponseBody.cs (2)
17private long _leftToWrite = long.MinValue; 462if (_leftToWrite == long.MinValue)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\ConnectionManager.cs (1)
12private long _lastConnectionId = long.MinValue;
Microsoft.AspNetCore.SignalR.Client.Core (6)
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (6)
48private long _latestReceivedSequenceId = long.MinValue; 49private long _lastAckedId = long.MinValue; 325private long _startingSequenceId = long.MinValue; 421_startingSequenceId = long.MinValue; 470return (null, long.MinValue); 480return (null, long.MinValue);
Microsoft.AspNetCore.SignalR.Core (6)
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (6)
48private long _latestReceivedSequenceId = long.MinValue; 49private long _lastAckedId = long.MinValue; 325private long _startingSequenceId = long.MinValue; 421_startingSequenceId = long.MinValue; 470return (null, long.MinValue); 480return (null, long.MinValue);
Microsoft.Build (1)
Evaluation\Expander\ArgumentParser.cs (1)
218if (d >= long.MinValue && d <= long.MaxValue)
Microsoft.CodeAnalysis (1)
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (1)
209return startConstant.Int64Value == Int64.MinValue
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder_Conversions.cs (4)
4311case SpecialType.System_Int64: return (long.MinValue - 1D) <= value && value < (long.MaxValue + 1D); 4314maySucceedAtRuntime = (long.MinValue - 1D) < value && value < (long.MaxValue + 1D); 4340case SpecialType.System_Int64: return (long.MinValue - 1M) < value && value < (long.MaxValue + 1M); 4342maySucceedAtRuntime = (long.MinValue - 1M) < value && value < (long.MaxValue + 1M);
Binder\Binder_Operators.cs (2)
2576if (valueLeft.Int64Value == long.MinValue && valueRight.Int64Value == -1) 2578return long.MinValue;
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
108else if (scale == 0 && long.MinValue <= value && value <= long.MaxValue)
Utilities\ValueSetFactory.LongTC.cs (2)
18long INumericTC<long>.MinValue => long.MinValue; 51Debug.Assert(value != long.MinValue);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
168var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
168var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (2)
317return UnmanagedHelper<long>.TryCreate(parameterSymbol, attributeData, long.MinValue, long.MaxValue, out parameter); 369return UnmanagedHelper<long>.Validate(parameterSymbol, attributeData, long.MinValue, long.MaxValue, helper, out diagnostics);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
3218var ret = long.MinValue; 3451var value = long.MinValue; 3474var value = long.MinValue;
Microsoft.ML.AutoML (2)
Sweepers\Parameters.cs (2)
260long prevValue = long.MinValue; 273long prevValue = long.MinValue;
Microsoft.ML.Core (1)
Data\DataKind.cs (1)
238return long.MinValue;
Microsoft.ML.Core.Tests (1)
UnitTests\DataTypes.cs (1)
199var minValue = long.MinValue;
Microsoft.ML.Data (4)
Data\Conversion.cs (1)
1348Contracts.Assert(long.MinValue <= result && result <= 0);
DataLoadSave\Binary\Codecs.cs (2)
632_value = new DateTime(ticks == long.MinValue ? default : ticks); 746value = new DateTimeOffset(new DateTime(ticks == long.MinValue ? default : ticks), new TimeSpan(0, offset == short.MinValue ? default : offset, 0));
DataLoadSave\Binary\UnsafeTypeOps.cs (1)
185return new TimeSpan(ticks == long.MinValue ? default : ticks);
Microsoft.ML.Sweeper (2)
Parameters.cs (2)
268long prevValue = long.MinValue; 281long prevValue = long.MinValue;
Microsoft.ML.Tests (6)
CollectionsDataViewTest.cs (1)
150fLong = long.MinValue + 1,
TextLoaderTests.cs (2)
35string.Format("{0},{1},{2},{3}", sbyte.MinValue, short.MinValue, int.MinValue, long.MinValue), 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 },
Microsoft.ML.Transforms (3)
Expression\BuiltinFunctions.cs (3)
1054return neg ? I8.MinValue : I8.MaxValue; 1068return neg ? I8.MinValue : I8.MaxValue; 1090return neg ? I8.MinValue : I8.MaxValue;
Microsoft.Private.Windows.Core (1)
src\winforms\src\Microsoft.Private.Windows.Polyfills\system\NativeIntExtensions.cs (1)
16: unchecked((nint)(Int64.MinValue));
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (1)
3037If DecimalResult < Int64.MinValue OrElse DecimalResult > Int64.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (3)
1099If operand = Int64.MinValue Then 1100Return -CDec(Int64.MinValue) 4625If left = Int64.MinValue AndAlso right = -1 Then
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
168var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue
System.Configuration.ConfigurationManager (1)
System\Configuration\LongValidatorAttribute.cs (1)
10private long _min = long.MinValue;
System.Data.Common (8)
System\Data\Common\Int64Storage.cs (1)
122long max = long.MinValue;
System\Data\SQLTypes\SQLDecimal.cs (1)
566if (value != long.MinValue)
System\Data\SQLTypes\SQLInt64.cs (5)
194if ((x.m_value == long.MinValue) && (y.m_value == -1)) 210if ((x.m_value == long.MinValue) && (y.m_value == -1)) 270if (value > long.MaxValue || value < long.MinValue) 283if (value > long.MaxValue || value < long.MinValue) 600public static readonly SqlInt64 MinValue = new SqlInt64(long.MinValue);
System\Data\SQLTypes\SQLMoney.cs (1)
91!fPositive && ulValue > unchecked((ulong)(long.MinValue)))
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DsesSamplerBuilder.cs (1)
15? long.MinValue
System.Formats.Asn1 (3)
System\Formats\Asn1\AsnDecoder.Integer.cs (3)
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 912/// <see cref="long.MinValue">Int64.MinValue</see> and <see cref="long.MaxValue">Int64.MaxValue</see>, inclusive; otherwise
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 (2)
System\IO\Compression\ZipArchiveEntry.cs (2)
2543long xOffset = x != null && !x.OriginallyInArchive ? long.MaxValue : x?.OffsetOfLocalHeader ?? long.MinValue; 2544long yOffset = y != null && !y.OriginallyInArchive ? long.MaxValue : y?.OffsetOfLocalHeader ?? long.MinValue;
System.Linq.Expressions (1)
System\Linq\Expressions\Compiler\ILGen.cs (1)
1015if (long.MinValue <= value)
System.Private.CoreLib (23)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.cs (2)
125const long MinMilliSeconds = long.MinValue / TimeSpan.TicksPerMillisecond; 148if (ticksWithoutFraction < long.MinValue + fraction)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1739(value <= long.MinValue) ? long.MinValue : (long)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
1312if (value < 0 && (value != long.MinValue || !pdecIn.IsNegative))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
128internal const long NullOffset = long.MinValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
127Debug.Assert(ticks == long.MinValue /* -9223372036854775808 */);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (1)
608const long MinMilliSeconds = long.MinValue / TimeSpan.TicksPerMillisecond;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (3)
612static long IMinMaxValue<long>.MinValue => MinValue; 1019(actualValue <= MinValue) ? MinValue : (long)actualValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (5)
183get => unchecked((nint)nint_t.MinValue); 1042(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1049(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (2)
1862((float)value <= long.MinValue) ? long.MinValue : (long)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1635(value <= long.MinValue) ? long.MinValue : (long)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (2)
386result = (result < 0) ? long.MaxValue : long.MinValue; 1876result = (result < 0) ? long.MaxValue : long.MinValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
207internal const long MinTicks = long.MinValue; // -9,223,372,036,854,775,808
System.Private.DataContractSerialization (2)
System\Xml\XmlConverter.cs (2)
530if (value < long.MinValue / 10) 533if (value < long.MinValue + digit)
System.Private.Xml (3)
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)
309result = new TimeSpan(long.MinValue);
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (2)
4861(value <= long.MinValue) ? long.MinValue : (long)value;
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
36ulong unsignedRepresentation = (value == long.MinValue) ? (ulong)long.MaxValue : (ulong)(-value) - 1;
System.ServiceModel.Primitives (4)
Internals\System\Runtime\Ticks.cs (4)
44if (firstTicks == long.MaxValue || firstTicks == long.MinValue) 48if (secondTicks == long.MaxValue || secondTicks == long.MinValue) 56if (firstTicks <= 0 && long.MinValue - firstTicks >= secondTicks) 58return long.MinValue + 1;
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
444/// is written in scientific notation) or, it represents a number less than <see cref="long.MinValue"/> or greater