103 references to MaxValue
dotnet-svcutil-lib (3)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3444private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(sbyte.MinValue, sbyte.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
927if (value < (int)SByte.MinValue || value > (int)SByte.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
460if (value < SByte.MinValue || value > SByte.MaxValue)
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
ILCompiler.Compiler (1)
Compiler\TypePreinit.cs (1)
936ValueTypeValue.FromInt32((sbyte)(int)Math.Clamp(double.IsNaN(val) ? 0 : val, sbyte.MinValue, sbyte.MaxValue)));
Microsoft.CodeAnalysis (2)
EnumConstantHelper.cs (1)
33overflowKind = CheckOverflow(sbyte.MaxValue, previous, offset);
ExtendedSpecialType.cs (1)
21Debug.Assert(value >= sbyte.MinValue && value <= sbyte.MaxValue);
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Conversions.cs (2)
4307case SpecialType.System_SByte: return (sbyte.MinValue - 1D) < value && value < (sbyte.MaxValue + 1D); 4337case SpecialType.System_SByte: return (sbyte.MinValue - 1M) < value && value < (sbyte.MaxValue + 1M);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1389return sbyte.MinValue <= value && value <= sbyte.MaxValue;
Utilities\ValueSetFactory.SByteTC.cs (2)
19sbyte INumericTC<sbyte>.MaxValue => sbyte.MaxValue; 44Debug.Assert(value != sbyte.MaxValue);
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (2)
311return UnmanagedHelper<long>.TryCreate(parameterSymbol, attributeData, sbyte.MinValue, sbyte.MaxValue, out parameter); 363return UnmanagedHelper<long>.Validate(parameterSymbol, attributeData, sbyte.MinValue, sbyte.MaxValue, helper, out diagnostics);
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1527if (value <= (ulong)sbyte.MaxValue)
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
3769var ret = sbyte.MaxValue; 3986var value = sbyte.MaxValue; 4009var value = sbyte.MaxValue;
Microsoft.ML.Core (2)
Data\DataKind.cs (2)
171return (ulong)sbyte.MaxValue; 198return (ulong)sbyte.MaxValue;
Microsoft.ML.Core.Tests (2)
UnitTests\DataTypes.cs (2)
80sbyte maxValue = sbyte.MaxValue; 99src = (sbyte.MaxValue + 1).ToString().AsMemory();
Microsoft.ML.Data (2)
Data\Conversion.cs (2)
1220TryParseSigned(I1.MaxValue, in src, out long? res); 1453TryParseSigned(I1.MaxValue, in src, out long? res);
Microsoft.ML.Tests (8)
CollectionsDataViewTest.cs (2)
116fsByte = sbyte.MaxValue - 1, 131fsByte = sbyte.MaxValue,
TextLoaderTests.cs (2)
36string.Format("{0},{1},{2},{3}", sbyte.MaxValue, short.MaxValue, int.MaxValue, long.MaxValue), 54sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default };
Transformers\ConvertTests.cs (3)
158AF = new sbyte[]{ sbyte.MinValue, sbyte.MaxValue}, 226AF = new sbyte[]{ sbyte.MinValue, sbyte.MaxValue}, 238ConvF = new float[] { sbyte.MinValue, sbyte.MaxValue },
Transformers\HashTests.cs (1)
247if (value <= (ulong)sbyte.MaxValue)
Microsoft.ML.Transforms (1)
Expression\IlGeneratorExtensions.cs (1)
278if (sbyte.MinValue <= arg && arg <= sbyte.MaxValue)
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\Operators.vb (3)
2829If result > SByte.MaxValue OrElse result < SByte.MinValue Then 3297If result < SByte.MinValue OrElse result > SByte.MaxValue Then 3737If result > SByte.MaxValue OrElse result < SByte.MinValue Then
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
System.Data.Common (1)
System\Data\Common\SByteStorage.cs (1)
102sbyte min = sbyte.MaxValue;
System.Linq (1)
System\Linq\Sequence.cs (1)
85if (typeof(T) == typeof(sbyte) && (range = TryUseRange<short>(start, endInclusive, step, sbyte.MaxValue)) is not null) return range;
System.Private.CoreLib (49)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.D.cs (1)
70if ((uint)answer > (uint)sbyte.MaxValue + (-1 * sign + 1) / 2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.N.cs (1)
63if (answer > sbyte.MaxValue + (-1 * sign + 1) / 2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (2)
1010sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (2)
1882sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (9)
558if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 565if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 572if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 579if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 586if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 593if (value > (uint)sbyte.MaxValue) ThrowSByteOverflowException(); 600if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 607if (value > (ulong)sbyte.MaxValue) ThrowSByteOverflowException(); 2089if (r < sbyte.MinValue || r > sbyte.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1758sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
109if ((long)uint64Value < sbyte.MinValue || (long)uint64Value > sbyte.MaxValue) return null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (2)
1840sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1655sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (2)
428result = (result < 0) ? sbyte.MaxValue : sbyte.MinValue; 1918result = (result < 0) ? sbyte.MaxValue : sbyte.MinValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (16)
555static sbyte IMinMaxValue<sbyte>.MaxValue => MaxValue; 935result = (actualValue >= MaxValue) ? MaxValue : 942result = (actualValue >= MaxValue) ? MaxValue : 949result = (actualValue >= MaxValue) ? MaxValue : 956result = (actualValue >= MaxValue) ? MaxValue : 963result = (actualValue >= MaxValue) ? MaxValue : 970result = (actualValue >= MaxValue) ? MaxValue : 1023result = (actualValue >= MaxValue) ? MaxValue : 1398static sbyte IBinaryIntegerParseAndFormatInfo<sbyte>.MaxValueDiv10 => MaxValue / 10;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1939sbyte actualResult = (value >= new UInt128(0x0000_0000_0000_0000, 0x0000_0000_0000_007F)) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (2)
1015sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
1086sbyte actualResult = (value >= (uint)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1087sbyte actualResult = (value >= (ulong)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1086sbyte actualResult = (value >= (nuint)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
674if (value < sbyte.MinValue || value > sbyte.MaxValue)
System.Private.Xml (2)
System\Xml\Schema\DataTypeImplementation.cs (1)
3376private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(sbyte.MinValue, sbyte.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
842if (value < (int)sbyte.MinValue || value > (int)sbyte.MaxValue)
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (3)
4891actualResult = IsNegative(value) ? sbyte.MinValue : sbyte.MaxValue; 4895actualResult = (value._sign >= sbyte.MaxValue) ? sbyte.MaxValue :
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
342/// than <see cref="sbyte.MaxValue"/>.