199 references to MinValue
BinaryFormatTests (2)
FormatTests\FormattedObject\ListTests.cs (1)
100new List<long>() { 0, -2, long.MinValue, long.MaxValue },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
42{ (byte)PrimitiveType.Int64, long.MinValue },
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;
Extensibility.MessageInterceptor.IntegrationTests (4)
TimeoutHelper.cs (4)
178if (firstTicks == long.MaxValue || firstTicks == long.MinValue) 182if (secondTicks == long.MaxValue || secondTicks == long.MinValue) 190if (firstTicks <= 0 && long.MinValue - firstTicks >= secondTicks) 192return long.MinValue + 1;
Microsoft.Analyzers.Local.Tests (3)
Json\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.Components.Tests (1)
Routing\RouteTableFactoryTests.cs (1)
383new object[] { "/{value:long}", $"/-9223372036854775808", long.MinValue },
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
199new object[] {"long", "long.MinValue", long.MinValue, true },
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
276{ long.MinValue, int.MinValue },
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.HttpSys (2)
RequestProcessing\ResponseBody.cs (2)
17private long _leftToWrite = long.MinValue; 469if (_leftToWrite == long.MinValue)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\ConnectionManager.cs (1)
12private long _lastConnectionId = long.MinValue;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (6)
HttpHeadersTests.cs (1)
296Assert.Throws<ArgumentOutOfRangeException>(() => httpHeaders.ContentLength = long.MinValue);
KestrelServerLimitsTests.cs (4)
20[InlineData(long.MinValue)] 230[InlineData(long.MinValue)] 255[InlineData(long.MinValue)] 286[InlineData(long.MinValue)]
ResourceCounterTests.cs (1)
15[InlineData(long.MinValue)]
Microsoft.AspNetCore.SignalR.Client.Core (6)
src\SignalR\common\Shared\MessageBuffer.cs (6)
47private long _latestReceivedSequenceId = long.MinValue; 48private long _lastAckedId = long.MinValue; 318private long _startingSequenceId = long.MinValue; 414_startingSequenceId = long.MinValue; 463return (null, long.MinValue); 473return (null, long.MinValue);
Microsoft.AspNetCore.SignalR.Core (6)
src\SignalR\common\Shared\MessageBuffer.cs (6)
47private long _latestReceivedSequenceId = long.MinValue; 48private long _lastAckedId = long.MinValue; 318private long _startingSequenceId = long.MinValue; 414_startingSequenceId = long.MinValue; 463return (null, long.MinValue); 473return (null, long.MinValue);
Microsoft.Build (1)
Evaluation\Expander\ArgumentParser.cs (1)
217if (d >= long.MinValue && d <= long.MaxValue)
Microsoft.Build.Engine.UnitTests (6)
Evaluation\ExpanderFunction_Tests.cs (1)
144const long expected = long.MinValue;
Evaluation\IntrinsicFunctionOverload_Tests.cs (5)
70string expected = ((long.MinValue - 1D) + 1).ToString(); 156string expected = ((long.MinValue - 1D) - 1).ToString(); 242string expected = ((long.MinValue - 1D) * 1).ToString(); 328string expected = ((long.MinValue - 1D) / 1).ToString(); 414string expected = ((long.MinValue - 1D) % 1).ToString();
Microsoft.CodeAnalysis (1)
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (1)
209return startConstant.Int64Value == Int64.MinValue
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
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);
Binder\Binder_Operators.cs (2)
1755if (valueLeft.Int64Value == long.MinValue && valueRight.Int64Value == -1) 1757return 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\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
160var isOutOfRange = d is < long.MinValue or > long.MaxValue;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenIncrementTests.cs (1)
78TestIncrementCompilationAndOutput<long>(long.MaxValue, long.MinValue);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
9395string nintMinValue = IntPtr.Size == 4 ? int.MinValue.ToString() : long.MinValue.ToString();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NativeIntegerTests.cs (1)
13760string nintMinValue = IntPtr.Size == 4 ? int.MinValue.ToString() : long.MinValue.ToString();
Utilities\ValueSetTests.cs (1)
444Assert.Equal($"[{long.MinValue}..1]", s1.ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetSemanticInfoTests.cs (4)
936EnumOffset(ConstantValue.Create((long)long.MinValue), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(long.MinValue + 1))); 937EnumOffset(ConstantValue.Create((long)long.MinValue), 2, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(long.MinValue + 2)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
342CheckLiteralToString(long.MinValue, @"-9223372036854775808L");
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)
75VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(long.MinValue), "global::System.Int64.MinValue");
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 (2)
Diagnostics\OperationTestAnalyzer.cs (2)
340long maxCaseValue = long.MinValue; 544long priorArgumentValue = long.MinValue;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.vb (1)
79CheckLiteralToString(Long.MinValue, "-9223372036854775808L")
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
241Dim valueIsOutOfRange = d <= Long.MinValue OrElse d > Long.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
71VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Long.MinValue), "Global.System.Int64.MinValue")
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
69{ long.MinValue, nameof(long.MinValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
ObjectSerializationTests.cs (1)
374TestRoundTripValue<Int64>(Int64.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.Net.Http.Headers.Tests (2)
HeaderUtilitiesTest.cs (2)
112[InlineData(long.MinValue)] 124[InlineData(long.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
SocialWeather (1)
Pipe\PipeWeatherStreamFormatter.cs (1)
22var reportTime = long.MinValue;
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.Drawing.Common.Tests (1)
System\Drawing\Imaging\EncoderParameterTests.cs (1)
67[InlineData(long.MinValue)]
System.Formats.Asn1 (2)
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.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)
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.Linq.Expressions (1)
System\Linq\Expressions\Compiler\ILGen.cs (1)
1015if (long.MinValue <= value)
System.Private.CoreLib (39)
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\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1768(value <= long.MinValue) ? long.MinValue : (long)value;
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
1302if (value < 0 && (value != long.MinValue || !pdecIn.IsNegative))
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
128internal const long NullOffset = long.MinValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
127Debug.Assert(ticks == long.MinValue /* -9223372036854775808 */);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (1)
608const long MinMilliSeconds = long.MinValue / TimeSpan.TicksPerMillisecond;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (13)
623static long IMinMaxValue<long>.MinValue => MinValue; 1003(actualValue <= MinValue) ? MinValue : (long)actualValue; 1010(actualValue == Half.NegativeInfinity) ? MinValue : (long)actualValue; 1029(actualValue <= MinValue) ? MinValue : (long)actualValue; 1048(actualValue <= MinValue) ? MinValue : (long)actualValue; 1079(actualValue <= MinValue) ? MinValue : (long)actualValue; 1086(actualValue == Half.NegativeInfinity) ? MinValue : (long)actualValue; 1123(actualValue <= MinValue) ? MinValue : (long)actualValue;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (15)
179get => unchecked((nint)nint_t.MinValue); 998(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1005(actualValue == Half.NegativeInfinity) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1024(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1031(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1044(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1075(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1082(actualValue == Half.NegativeInfinity) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue; 1119(actualValue <= nint_t.MinValue) ? unchecked((nint)nint_t.MinValue) : (nint)actualValue;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1708(value <= long.MinValue) ? long.MinValue : (long)value;
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
213internal 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.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)
171MinValue = long.MinValue,
System\Value\StoringLong.cs (1)
13{ long.MinValue }
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 (6)
System\Numerics\BigInteger.cs (2)
4750(value <= long.MinValue) ? long.MinValue : (long)value;
System\Numerics\Complex.cs (4)
1874(value.m_real <= long.MinValue) ? long.MinValue : (long)value.m_real; 2010(value.m_real <= long.MinValue) ? long.MinValue : (long)value.m_real;
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
33ulong unsignedRepresentation = (value == long.MinValue) ? (ulong)long.MaxValue : (ulong)(-value) - 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
System.Windows.Forms.Primitives.Tests (11)
Interop\Oleaut32\VARIANTTests.cs (11)
172yield return new object[] { VT_I1, unchecked((nint)long.MinValue), (sbyte)0 }; 203yield return new object[] { VT_I2, unchecked((nint)long.MinValue), (short)0 }; 233yield return new object[] { VT_I4, unchecked((nint)long.MinValue), 0 }; 264yield return new object[] { VT_INT, unchecked((nint)long.MinValue), 0 }; 299yield return new object[] { VT_ERROR, unchecked((nint)long.MinValue), 0 }; 392yield return new object[] { unchecked((nint)long.MinValue), long.MinValue }; 420yield return new object[] { long.MinValue }; 695yield return new object[] { unchecked((nint)long.MinValue), 0 }; 1052yield return new object[] { long.MinValue, (decimal)long.MinValue };