578 references to MaxValue
Aspire.Dashboard.Tests (1)
Integration\ServerRetryHelper.cs (1)
85for (var i = startingPort; i < ushort.MaxValue; i++)
BinaryFormatTests (4)
FormatTests\FormattedObject\ListTests.cs (2)
26ushort.MaxValue, 99new List<ushort>() { 1, 2, ushort.MinValue, ushort.MaxValue },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
57{ (byte)PrimitiveType.UInt16, ushort.MaxValue }, 124ushort.MaxValue,
dotnet-svcutil-lib (9)
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNode.cs (3)
363Debug.Assert(info != null && idxParent <= UInt16.MaxValue); 441Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= UInt16.MaxValue, "Bad argument"); 460Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= UInt16.MaxValue, "Bad argument");
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNodeHelper.cs (1)
183Debug.Assert(idxNode <= UInt16.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3644private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(ushort.MinValue, ushort.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
935if (value < (int)UInt16.MinValue || value > (int)UInt16.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
518if (value < UInt16.MinValue || value > UInt16.MaxValue)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EventDescriptor.cs (2)
45if (id > ushort.MaxValue) 62if (task > ushort.MaxValue)
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (1)
70for (var i = startingPort; i < ushort.MaxValue; i++)
Interop.FunctionalTests (1)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (1)
70for (var i = startingPort; i < ushort.MaxValue; i++)
Microsoft.AspNetCore.Components.Server (9)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (9)
137else if (count <= ushort.MaxValue) 177else if (count <= ushort.MaxValue) 364else if (value <= ushort.MaxValue) 475else if (value <= ushort.MaxValue) 807else if (length <= UInt16.MaxValue) 893else if (byteCount <= ushort.MaxValue) 1014else if (dataLength <= UInt16.MaxValue) 1225else if (characterLength <= ushort.MaxValue) 1269else if (byteCount <= ushort.MaxValue)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
204new object[] {"ushort", "ushort.MaxValue", ushort.MaxValue, true },
Microsoft.AspNetCore.InternalTesting.Tests (1)
HttpClientSlimTest.cs (1)
85address = $"http://localhost:{random.Next(1024, ushort.MaxValue)}/";
Microsoft.AspNetCore.Server.HttpSys (1)
TimeoutManager.cs (1)
184if (timeoutValue < 0 || timeoutValue > ushort.MaxValue)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (1)
70for (var i = startingPort; i < ushort.MaxValue; i++)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (1)
70for (var i = startingPort; i < ushort.MaxValue; i++)
Microsoft.AspNetCore.Session (2)
DistributedSession.cs (2)
24private const int KeyLengthLimit = ushort.MaxValue; 362if (num < 0 || ushort.MaxValue < num)
Microsoft.Build.Tasks.Core (1)
NativeMethods.cs (1)
569internal const UInt16 IMAGE_FILE_MACHINE_INVALID = UInt16.MaxValue; // Invalid value for the machine type.
Microsoft.CodeAnalysis (29)
CodeGen\EmitState.cs (2)
47Debug.Assert(value >= 0 && value <= ushort.MaxValue); 63Debug.Assert(value >= 0 && value <= ushort.MaxValue);
CodeGen\SequencePointList.cs (1)
186const int MaxColumn = ushort.MaxValue - 1;
EnumConstantHelper.cs (1)
63overflowKind = CheckOverflow(ushort.MaxValue, previous, offset);
MetadataReference\AssemblyIdentity.cs (4)
256&& value.Major <= ushort.MaxValue 257&& value.Minor <= ushort.MaxValue 258&& value.Build <= ushort.MaxValue 259&& value.Revision <= ushort.MaxValue;
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
650if (partValue > ushort.MaxValue)
PEWriter\MetadataWriter.DynamicAnalysis.cs (2)
281BlobIndexSize = (blobHeapSize <= ushort.MaxValue) ? 2 : 4; 282GuidIndexSize = (guidHeapSize <= ushort.MaxValue) ? 2 : 4;
ReferenceManager\CommonReferenceManager.State.cs (5)
555Debug.Assert(versionPattern.Build == ushort.MaxValue || versionPattern.Revision == ushort.MaxValue); 590Debug.Assert(versionPattern is null || versionPattern.Build == ushort.MaxValue || versionPattern.Revision == ushort.MaxValue); 592if ((versionPattern is null || versionPattern.Build < ushort.MaxValue) && version.Build != candidateVersion.Build)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
87Debug.Assert(groupSizes.Count <= ushort.MaxValue); 104Debug.Assert(usingCount <= ushort.MaxValue);
Symbols\Attributes\CommonAssemblyWellKnownAttributeData.cs (1)
97/// If the string passed to AssemblyVersionAttribute contains * the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>.
VersionHelper.cs (10)
21return TryParse(s, allowWildcard: false, maxValue: ushort.MaxValue, allowPartialParse: true, version: out version); 32/// If <paramref name="s"/> contains * the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>. 37return TryParse(s, allowWildcard: allowWildcard, maxValue: ushort.MaxValue - 1, allowPartialParse: false, version: out version); 50/// If <paramref name="s"/> contains * and wildcard is allowed the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>. 55Debug.Assert(!allowWildcard || maxValue < ushort.MaxValue); 142values[i] = ushort.MaxValue; 172if (pattern == null || pattern.Revision != ushort.MaxValue) 188Debug.Assert(revision < ushort.MaxValue); 190if (pattern.Build == ushort.MaxValue) 193int build = Math.Min(ushort.MaxValue, (int)days.TotalDays);
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (4)
389else if (v >= 0 && v < ushort.MaxValue) 412else if (v >= 0 && v < ushort.MaxValue) 430else if (value <= (ushort.MaxValue >> 2)) 474else if (id <= ushort.MaxValue)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
53{ ushort.MaxValue, nameof(ushort.MaxValue) },
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Conversions.cs (2)
3607case SpecialType.System_UInt16: return (ushort.MinValue - 1D) < value && value < (ushort.MaxValue + 1D); 3637case SpecialType.System_UInt16: return (ushort.MinValue - 1M) < value && value < (ushort.MaxValue + 1M);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1385return ushort.MinValue <= value && value <= ushort.MaxValue;
Symbols\AssemblySymbol.cs (1)
95/// Assembly version pattern with wildcards represented by <see cref="ushort.MaxValue"/>,
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
420Debug.Assert((uint)implFlags <= ushort.MaxValue); 433Debug.Assert((uint)localflags <= ushort.MaxValue);
Symbols\Source\SourceAssemblySymbol.cs (2)
415return (object)attributeValue == null || (attributeValue.Build != ushort.MaxValue && attributeValue.Revision != ushort.MaxValue) ? null : attributeValue;
Utilities\ValueSetFactory.UShortTC.cs (2)
20ushort INumericTC<ushort>.MaxValue => ushort.MaxValue; 45Debug.Assert(value != ushort.MaxValue);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
2455F({ushort.MaxValue + 1});
Microsoft.CodeAnalysis.CSharp.Features (1)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
97SpecialType.System_UInt16 => IsUnsignedBoundary(startValue, endValue, ushort.MaxValue),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ConstantTests.cs (2)
4010shortConst = ConstantValue.Create(unchecked((short)ushort.MaxValue)), 4011ushortConst = ConstantValue.Create(ushort.MaxValue),
Semantics\NativeIntegerTests.cs (1)
6589F({ushort.MaxValue + 1});
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetSemanticInfoTests.cs (4)
915EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((ushort)ushort.MaxValue)); 916EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 917EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
320CheckLiteralToString(ushort.MaxValue, @"65535");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
144VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(ushort.MaxValue), "global::System.UInt16.MaxValue");
Microsoft.CodeAnalysis.Debugging.Package (2)
CustomDebugInfoEncoder.cs (2)
87Debug.Assert(groupSizes.Count <= ushort.MaxValue); 104Debug.Assert(usingCount <= ushort.MaxValue);
Microsoft.CodeAnalysis.Features (2)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
87Debug.Assert(groupSizes.Count <= ushort.MaxValue); 104Debug.Assert(usingCount <= ushort.MaxValue);
Microsoft.CodeAnalysis.Test.Utilities (4)
Metadata\DynamicAnalysisDataReader.cs (4)
103bool isBlobHeapSmall = blobHeapSize <= ushort.MaxValue; 104bool isGuidHeapSmall = guidHeapSize / GuidSize <= ushort.MaxValue; 344if (column > ushort.MaxValue) 366if (result < 0 || result >= ushort.MaxValue)
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\Source\SourceAssemblySymbol.vb (2)
781Return If(attributeValue Is Nothing OrElse (attributeValue.Build <> UShort.MaxValue AndAlso attributeValue.Revision <> UShort.MaxValue), Nothing, attributeValue)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
111value >= UShort.MinValue AndAlso value <= UShort.MaxValue Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolDisplay\ObjectDisplayTests.vb (2)
24Assert.Equal("65535", FormatPrimitive(UShort.MaxValue)) 54Assert.Equal("&HFFFF", FormatPrimitiveUsingHexadecimalNumbers(UShort.MaxValue))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
111value >= UShort.MinValue AndAlso value <= UShort.MaxValue Then
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (4)
389else if (v >= 0 && v < ushort.MaxValue) 412else if (v >= 0 && v < ushort.MaxValue) 430else if (value <= (ushort.MaxValue >> 2)) 474else if (id <= ushort.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
53{ ushort.MaxValue, nameof(ushort.MaxValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
ObjectSerializationTests.cs (12)
285TestRoundTripValue(UInt16.MaxValue); 326TestRoundTripValue<Int32>(UInt16.MaxValue); 345TestRoundTripValue<Int32>(UInt16.MaxValue); 369TestRoundTripValue<Int64>(UInt16.MaxValue); 395TestRoundTripValue<UInt64>(UInt16.MaxValue); 420writer.WriteUInt16(UInt16.MaxValue); 444Assert.Equal(UInt16.MaxValue, reader.ReadUInt16()); 474writer.WriteScalarValue(UInt16.MaxValue); 512Assert.Equal(UInt16.MaxValue, (UInt16)reader.ReadScalarValue()); 585for (int i = ushort.MinValue; i <= ushort.MaxValue; i++) 618for (int i = ushort.MinValue; i <= ushort.MaxValue; i++) 625for (int i = ushort.MinValue; i <= ushort.MaxValue; i++)
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1547if (value <= ushort.MaxValue)
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
5717var ret = ushort.MaxValue; 5934var value = ushort.MaxValue; 5957var value = ushort.MaxValue;
Microsoft.DotNet.Build.Tasks.Workloads (2)
Msi\MsiUtils.wix.cs (2)
204if (version.Build > ushort.MaxValue) 206throw new ArgumentOutOfRangeException(string.Format(Strings.MsiProductVersionOutOfRange, nameof(version.Build), ushort.MaxValue));
Microsoft.Gen.Logging.Generated.Tests (3)
TagProviderTests.cs (2)
77var classToLog = new ClassToLog { MyIntProperty = ushort.MaxValue }; 100var classToLog = new ClassToLog { MyIntProperty = ushort.MaxValue };
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (1)
131public static int StaticNumberProperty { get; set; } = ushort.MaxValue; // Not supposed to be logged (static)
Microsoft.ML.Core (2)
Data\DataKind.cs (2)
177return ushort.MaxValue; 204return ushort.MaxValue;
Microsoft.ML.Data (5)
Data\Conversion.cs (5)
849public void Convert(in U4 src, ref U2 dst) => dst = src <= U2.MaxValue ? (U2)src : (U2)0; 850public void Convert(in U8 src, ref U2 dst) => dst = src <= U2.MaxValue ? (U2)src : (U2)0; 851public void Convert(in UG src, ref U2 dst) => dst = src.High == 0 && src.Low <= U2.MaxValue ? (U2)src.Low : (U2)0; 1003if (!TryParse(in src, out res) || res > U2.MaxValue) 1500if (res > U2.MaxValue)
Microsoft.ML.DataView (1)
KeyDataViewType.cs (1)
96return ushort.MaxValue;
Microsoft.ML.FastTree (1)
Dataset\DenseIntArray.cs (1)
654Contracts.Assert(0 <= value && value <= ushort.MaxValue);
Microsoft.ML.Tests (9)
CollectionsDataViewTest.cs (4)
123fuShort = ushort.MaxValue - 1, 138fuShort = ushort.MaxValue, 387fuShort = new ushort[2] { 0, ushort.MaxValue } 439UShortProp = new ushort[2] { 0, ushort.MaxValue }
Transformers\ConvertTests.cs (3)
160AH = new ushort[]{ ushort.MinValue, ushort.MaxValue}, 228AH = new ushort[]{ ushort.MinValue, ushort.MaxValue}, 240ConvH = new float[] { ushort.MinValue, ushort.MaxValue },
Transformers\HashTests.cs (2)
235if (value <= ushort.MaxValue) 238HashTestCore((ushort)value, new KeyDataViewType(typeof(ushort), ushort.MaxValue - 1), eKey, eoKey, e3Key, ecKey, 0);
Microsoft.ML.Transforms (1)
Text\TokenizingByCharacters.cs (1)
98internal const int CharsCount = ushort.MaxValue;
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\Operators.vb (2)
2851If result > UInt16.MaxValue Then 3759If result > UInt16.MaxValue Then
PresentationBuildTasks (11)
MS\Internal\MarkupCompiler\VersionHelper.cs (10)
26return TryParse(s, allowWildcard: false, maxValue: ushort.MaxValue, allowPartialParse: true, version: out version, hasWildcard: out bool _); 37/// If <paramref name="s"/> contains * the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>. 43return TryParse(s, allowWildcard: allowWildcard, maxValue: ushort.MaxValue - 1, allowPartialParse: false, version: out version, hasWildcard: out hasWildcard); 56/// If <paramref name="s"/> contains * and wildcard is allowed the version build and/or revision numbers are set to <see cref="ushort.MaxValue"/>. 61Debug.Assert(!allowWildcard || maxValue < ushort.MaxValue); 153values[i] = ushort.MaxValue; 183if (pattern == null || pattern.Revision != ushort.MaxValue) 199Debug.Assert(revision < ushort.MaxValue); 201if (pattern.Build == ushort.MaxValue) 204int build = Math.Min(ushort.MaxValue, (int)days.TotalDays);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlInt32CollectionSerializer.cs (1)
148else if ( allPositive && max <= UInt16.MaxValue )
PresentationCore (8)
MS\Internal\Shaping\Context.cs (3)
77ushort lookupIndex = ushort.MaxValue; 78ushort sequenceIndex = ushort.MaxValue; 107if (lookupIndex == ushort.MaxValue)
MS\Internal\Shaping\OpenTypeLayoutCache.cs (2)
302if (maxCacheSize > ushort.MaxValue) 305maxCacheSize = ushort.MaxValue;
System\Windows\Media\FamilyMapCollection.cs (1)
254if (_count + 1 >= ushort.MaxValue)
System\Windows\Media\GlyphTypeface.cs (2)
230if (glyphs.Count > ushort.MaxValue) 231throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, ushort.MaxValue), nameof(glyphs));
PresentationFramework (1)
System\Windows\Markup\XamlInt32CollectionSerializer.cs (1)
148else if ( allPositive && max <= UInt16.MaxValue )
ReachFramework (1)
PrintConfig\PrintCapabilitesWriter.cs (1)
625int maxDevModeSize = ((ushort.MaxValue) * 2 * 4 + 2) / 3;
ScenarioTests.Common.Tests (2)
ScenarioTestHelpers.cs (2)
130UshortValue = ushort.MaxValue 172UshortValue = ushort.MaxValue
System.Data.Common (1)
System\Data\Common\UInt16Storage.cs (1)
105ushort min = ushort.MaxValue;
System.Drawing.Common.Tests (3)
System\Drawing\BitmapTests.cs (2)
217[InlineData(ushort.MaxValue * 513)] 232[InlineData(ushort.MaxValue * 513)]
System\Drawing\IconTests.cs (1)
801[InlineData(ushort.MaxValue + 1)]
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
508if (length <= ushort.MaxValue)
System.Formats.Cbor (3)
System\Formats\Cbor\Reader\CborReader.Integer.cs (1)
195if (result <= ushort.MaxValue)
System\Formats\Cbor\Writer\CborWriter.Integer.cs (2)
98else if (value <= ushort.MaxValue) 131else if (value <= ushort.MaxValue)
System.IO.Compression (11)
System\IO\Compression\ZipArchive.cs (1)
206/// If the comment byte length is larger than <see cref="ushort.MaxValue"/>, it will be truncated when disposing the archive.
System\IO\Compression\ZipArchiveEntry.cs (8)
151if (_storedEntryNameBytes.Length > ushort.MaxValue) 209/// If the comment byte length is larger than <see cref="ushort.MaxValue"/>, it will be truncated when disposing the archive. 217_fileComment = ZipHelper.GetEncodedTruncatedBytesFromString(value, _archive.EntryNameAndCommentEncoding, ushort.MaxValue, out bool isUTF8); 487Debug.Assert(_storedEntryNameBytes.Length <= ushort.MaxValue); 488Debug.Assert(_fileComment.Length <= ushort.MaxValue); 546if (bigExtraFieldLength > ushort.MaxValue) 964Debug.Assert(_storedEntryNameBytes.Length <= ushort.MaxValue); 1032if (bigExtraFieldLength > ushort.MaxValue)
System\IO\Compression\ZipBlocks.cs (2)
860public const int ZipFileCommentMaxLength = ushort.MaxValue; 874ushort numberOfEntriesTruncated = numberOfEntries > ushort.MaxValue ?
System.Linq.Expressions (4)
System\Dynamic\Utils\ExpressionUtils.cs (1)
314if (((IParameterProvider)lambda).ParameterCount >= ushort.MaxValue)
System\Linq\Expressions\Compiler\ILGen.cs (3)
39Debug.Assert(index < ushort.MaxValue); 47Debug.Assert(index < ushort.MaxValue); 55Debug.Assert(index < ushort.MaxValue);
System.Net.HttpListener (1)
System\Net\Managed\HttpListenerTimeoutManager.Managed.cs (1)
88ArgumentOutOfRangeException.ThrowIfGreaterThan(timeoutValue, ushort.MaxValue, nameof(value));
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
28ushort id = (ushort)Random.Shared.Next(ushort.MaxValue + 1);
System.Net.Quic (2)
System\Net\Quic\QuicConnectionOptions.cs (2)
156ValidateInRange(argumentName, MaxInboundBidirectionalStreams, ushort.MaxValue); 157ValidateInRange(argumentName, MaxInboundUnidirectionalStreams, ushort.MaxValue);
System.Net.Sockets (2)
System\Net\Sockets\Socket.cs (2)
2125if (lingerOption.LingerTime < 0 || lingerOption.LingerTime > (int)ushort.MaxValue) 2127throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue));
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
740else if (payload.Length <= ushort.MaxValue)
System.Private.CoreLib (85)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (4)
30if (major != ushort.MaxValue) 36if (minor != ushort.MaxValue) 42if (build != ushort.MaxValue) 48if (revision != ushort.MaxValue)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (8)
261Span<ushort> versionNumbers = [ushort.MaxValue, ushort.MaxValue, ushort.MaxValue, ushort.MaxValue]; 276if (versionNumbers[0] == ushort.MaxValue || 277versionNumbers[1] == ushort.MaxValue) 283versionNumbers[2] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1]) : 284versionNumbers[3] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1], versionNumbers[2]) :
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (1)
1176Debug.Assert(value >= 0 && value <= ushort.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.D.cs (1)
133if ((uint)answer > ushort.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.N.cs (1)
136if (answer > ushort.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.X.cs (1)
157if (parsedValue > ushort.MaxValue / 0x10)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (4)
923if (value > ushort.MaxValue) ThrowUInt16OverflowException(); 933if (value > ushort.MaxValue) ThrowUInt16OverflowException(); 2112if (fromBase != 10 && r <= ushort.MaxValue) 2138if ((uint)r > ushort.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventDescriptor.cs (4)
61if (id > ushort.MaxValue) 63throw new ArgumentOutOfRangeException(nameof(id), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue)); 76if (task > ushort.MaxValue) 78throw new ArgumentOutOfRangeException(nameof(task), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (4)
109if (size > ushort.MaxValue) 111size = ushort.MaxValue - 1; 188if (length > ushort.MaxValue) 190length = ushort.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
1416ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
121if (uint64Value > ushort.MaxValue) return null;
src\libraries\System.Private.CoreLib\src\System\Guid.cs (2)
42public static Guid AllBitsSet => new Guid(uint.MaxValue, ushort.MaxValue, ushort.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
2118ushort actualResult = (value == PositiveInfinity) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int128.cs (2)
1821ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
1241ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
1236ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
1232ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1741ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (1)
59return (T)(object)ushort.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (1)
177ToUpperMask256 = Vector256.ConditionalSelect(isAsciiLetter, Vector256.Create(unchecked((ushort)~0x20)), Vector256.Create(ushort.MaxValue));
src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
1435ushort actualResult = (value >= ushort.MaxValue) ? ushort.MaxValue :
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (2)
1071if (matches != ushort.MaxValue) 1080if (matches == ushort.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (4)
1550const ushort asciiMask = ushort.MaxValue - 127; // 0xFF80 1572const ushort asciiMask = ushort.MaxValue - 127; // 0xFF80 1582const ushort asciiMask = ushort.MaxValue - 127; // 0xFF80 1591const ushort asciiMask = ushort.MaxValue - 127; // 0xFF80
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (1)
211if (highSurrogatesMask > ushort.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (3)
274_data = (_data & ~((ulong)ushort.MaxValue << shift)) | ((ulong)value << shift); 307Debug.Assert(WaiterCount < ushort.MaxValue); 320Debug.Assert(countsAfterUpdate.WaiterCount != ushort.MaxValue); // underflow check
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.ThreadCounts.cs (1)
27_data = (_data & ~((ulong)ushort.MaxValue << shift)) | ((ulong)(ushort)value << shift);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerTracking.cs (1)
72_data = (_data & ~((uint)ushort.MaxValue << shift)) | ((uint)(ushort)value << shift);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (15)
428static ushort IBinaryNumber<ushort>.AllBitsSet => MaxValue; 513static ushort IMinMaxValue<ushort>.MaxValue => MaxValue; 801result = (actualValue >= MaxValue) ? MaxValue : 808result = (actualValue >= MaxValue) ? MaxValue : (ushort)actualValue; 814result = (actualValue >= MaxValue) ? MaxValue : (ushort)actualValue; 820result = (actualValue >= MaxValue) ? MaxValue : (ushort)actualValue; 826result = (actualValue >= MaxValue) ? MaxValue : (ushort)actualValue; 868result = (actualValue >= MaxValue) ? MaxValue : 1216static ushort IBinaryIntegerParseAndFormatInfo<ushort>.MaxValueDiv10 => MaxValue / 10;
src\System\Reflection\AssemblyName.CoreCLR.cs (5)
50if (_major == ushort.MaxValue || _minor == ushort.MaxValue) 53if (_build == ushort.MaxValue) 56if (_revision == ushort.MaxValue) 164nameParts.SetVersion(parts._version, defaultValue: ushort.MaxValue);
src\System\Reflection\Emit\RuntimeILGenerator.cs (4)
333return (int)Math.Min(ushort.MaxValue, m_maxDepth + m_depthAdjustment); 447if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode 461if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode 475if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode
src\System\Reflection\RuntimeAssembly.cs (1)
392nameParts.SetVersion(assemblyName.Version, defaultValue: ushort.MaxValue);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
655if (value < ushort.MinValue || value > ushort.MaxValue)
System.Private.Uri (5)
System\Uri.cs (4)
3374if (_string.Length > ushort.MaxValue) 3510if (_string.Length > ushort.MaxValue) 3567if (_string.Length > ushort.MaxValue) 3844if (newHost.Length > ushort.MaxValue)
System\UriExt.cs (1)
207if (_string.Length > ushort.MaxValue)
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
72new List<ushort> { ushort.MinValue, ushort.MaxValue }, 92new ushort[] { ushort.MinValue, ushort.MaxValue },
System\Value\StoringUShort.cs (1)
11{ ushort.MaxValue },
System.Private.Xml (8)
System\Xml\Cache\XPathNode.cs (3)
361Debug.Assert(info != null && idxParent <= ushort.MaxValue); 439Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= ushort.MaxValue, "Bad argument"); 458Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= ushort.MaxValue, "Bad argument");
System\Xml\Cache\XPathNodeHelper.cs (1)
180Debug.Assert(idxNode <= ushort.MaxValue);
System\Xml\Schema\DataTypeImplementation.cs (1)
3570private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(ushort.MinValue, ushort.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
850if (value < (int)ushort.MinValue || value > (int)ushort.MaxValue)
System\Xml\Xsl\IlGen\GenerateHelper.cs (2)
703if (paramPos <= ushort.MaxValue) 717if (paramPos <= ushort.MaxValue)
System.Reflection.Emit (4)
System\Reflection\Emit\ILGeneratorImpl.cs (4)
49internal int GetMaxStack() => Math.Min(ushort.MaxValue, _maxStackDepth + _depthAdjustment); 368if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode 382if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode 396if ((uint)arg <= ushort.MaxValue) // this will be true except on misuse of the opcode
System.Reflection.Metadata (37)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (4)
30if (major != ushort.MaxValue) 36if (minor != ushort.MaxValue) 42if (build != ushort.MaxValue) 48if (revision != ushort.MaxValue)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (8)
261Span<ushort> versionNumbers = [ushort.MaxValue, ushort.MaxValue, ushort.MaxValue, ushort.MaxValue]; 276if (versionNumbers[0] == ushort.MaxValue || 277versionNumbers[1] == ushort.MaxValue) 283versionNumbers[2] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1]) : 284versionNumbers[3] == ushort.MaxValue ? new Version(versionNumbers[0], versionNumbers[1], versionNumbers[2]) :
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (8)
55if (unchecked((uint)genericArgumentCount) > ushort.MaxValue) 79if (unchecked((uint)genericParameterCount) > ushort.MaxValue) 700if (unchecked((uint)count) > ushort.MaxValue) 1099if (unchecked((uint)genericParameterCount) > ushort.MaxValue) 1125if (unchecked((uint)(genericArgumentCount - 1)) > ushort.MaxValue - 1) 1148if (unchecked((uint)parameterIndex) > ushort.MaxValue) 1164if (unchecked((uint)parameterIndex) > ushort.MaxValue) 1276if (unchecked((uint)(rank - 1)) > ushort.MaxValue - 1)
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (1)
61unchecked((uint)startOffset) <= ushort.MaxValue && unchecked((uint)length) <= byte.MaxValue;
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (4)
79if (unchecked((uint)maxStack) > ushort.MaxValue) 132/// <exception cref="ArgumentOutOfRangeException"><paramref name="maxStack"/> is out of range [0, <see cref="ushort.MaxValue"/>].</exception> 155/// <exception cref="ArgumentOutOfRangeException"><paramref name="maxStack"/> is out of range [0, <see cref="ushort.MaxValue"/>].</exception> 167if (unchecked((uint)maxStack) > ushort.MaxValue)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (7)
365if (unchecked((uint)generation) > ushort.MaxValue) 798/// <exception cref="ArgumentOutOfRangeException"><paramref name="sequenceNumber"/> is greater than <see cref="ushort.MaxValue"/>.</exception> 801if (unchecked((uint)sequenceNumber) > ushort.MaxValue) 828/// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is greater than <see cref="ushort.MaxValue"/>.</exception> 835if (unchecked((uint)index) > ushort.MaxValue) 1295/// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is greater than <see cref="ushort.MaxValue"/>.</exception> 1298if (unchecked((uint)index) > ushort.MaxValue)
System\Reflection\Metadata\Ecma335\MetadataSizes.cs (3)
150BlobReferenceIsSmall = isCompressed && heapSizes[(int)HeapIndex.Blob] <= ushort.MaxValue; 151StringReferenceIsSmall = isCompressed && heapSizes[(int)HeapIndex.String] <= ushort.MaxValue; 152GuidReferenceIsSmall = isCompressed && heapSizes[(int)HeapIndex.Guid] <= ushort.MaxValue;
System\Reflection\Metadata\PortablePdb\SequencePointCollection.cs (2)
140if (column > ushort.MaxValue) 173if (result < 0 || result >= ushort.MaxValue)
System.Reflection.MetadataLoadContext (4)
System\Reflection\TypeLoading\General\Helpers.cs (4)
165((v.Revision == ushort.MaxValue) ? 0b0001 : 0) | 166((v.Build == ushort.MaxValue) ? 0b0010 : 0) | 167((v.Minor == ushort.MaxValue) ? 0b0100 : 0) | 168((v.Major == ushort.MaxValue) ? 0b1000 : 0);
System.Runtime.Numerics (7)
System\Numerics\BigInteger.cs (3)
4803actualResult = IsNegative(value) ? ushort.MinValue : ushort.MaxValue; 4807actualResult = (value._sign >= ushort.MaxValue) ? ushort.MaxValue :
System\Numerics\Complex.cs (4)
1913ushort actualResult = (value.m_real >= ushort.MaxValue) ? ushort.MaxValue : 2049ushort actualResult = (value.m_real >= ushort.MaxValue) ? ushort.MaxValue :
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
57else if (value <= ushort.MaxValue) 93else if (value <= ushort.MaxValue)
System.Text.Encoding.CodePages (1)
System\Text\EncodingTable.cs (1)
188if ((uint)codePage > ushort.MaxValue)
System.Text.Encodings.Web (1)
System\Text\Encodings\Web\TextEncoder.cs (1)
598Debug.Assert(unicodeScalar < ushort.MaxValue);
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
479/// than <see cref="ushort.MaxValue"/>.
System.Threading (1)
System\Threading\ReaderWriterLock.cs (1)
29private const ushort MaxAcquireCount = ushort.MaxValue;
System.Windows.Forms (27)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (8)
10779if (weightSum > ushort.MaxValue) 10781throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10852Debug.Assert(weightSum <= ushort.MaxValue); 10911if (weightSum > ushort.MaxValue) 10913throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10917Debug.Assert(weightSum <= ushort.MaxValue); 13529if (weightSum > ushort.MaxValue) 13531throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
339ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ushort.MaxValue);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (3)
775ArgumentOutOfRangeException.ThrowIfGreaterThan(min, ushort.MaxValue); 778ArgumentOutOfRangeException.ThrowIfGreaterThan(max, ushort.MaxValue); 793ArgumentOutOfRangeException.ThrowIfGreaterThan(pos, ushort.MaxValue);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (6)
119/// The value is less than 0 or greater than <see cref="ushort.MaxValue" />. 134ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ushort.MaxValue); 165/// The value is less than 0 or greater than <see cref="ushort.MaxValue" />. 180ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ushort.MaxValue); 211/// The value is less than 0 or greater than <see cref="ushort.MaxValue" />. 226ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ushort.MaxValue);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogStandardIcon.cs (9)
19Information = ushort.MaxValue - 2, // TD_INFORMATION_ICON 24Warning = ushort.MaxValue, // TD_WARNING_ICON 29Error = ushort.MaxValue - 1, // TD_ERROR_ICON 34Shield = ushort.MaxValue - 3, // TD_SHIELD_ICON 40ShieldBlueBar = ushort.MaxValue - 4, 46ShieldGrayBar = ushort.MaxValue - 8, 52ShieldWarningYellowBar = ushort.MaxValue - 5, 58ShieldErrorRedBar = ushort.MaxValue - 6, 64ShieldSuccessGreenBar = ushort.MaxValue - 7,
System.Windows.Forms.Primitives.Tests (13)
Interop\Oleaut32\ITypeInfoTests.cs (1)
70ushort wOrdinal = ushort.MaxValue;
Interop\Oleaut32\VARIANTTests.cs (12)
193yield return new object[] { VT_UI1, (nint)ushort.MaxValue, byte.MaxValue }; 223yield return new object[] { VT_UI2, (nint)ushort.MaxValue, ushort.MaxValue }; 226yield return new object[] { VT_UI2, unchecked((nint)uint.MaxValue), ushort.MaxValue }; 229yield return new object[] { VT_UI2, (nint)(-1), ushort.MaxValue }; 254yield return new object[] { VT_UI4, (nint)ushort.MaxValue, (uint)ushort.MaxValue }; 285yield return new object[] { VT_UINT, (nint)ushort.MaxValue, (uint)ushort.MaxValue }; 451yield return new object[] { (nint)ushort.MaxValue, (ulong)ushort.MaxValue }; 472yield return new object[] { ushort.MaxValue };
System.Windows.Forms.Tests (173)
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
97ushort.MaxValue,
System\Windows\Forms\ControlTests.Properties.cs (154)
7921yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1) }; 7922yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue) }; 7923yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1) }; 7989yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(2, 3), 0 }; 7990yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(2, 3), 0 }; 7991yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(2, 3), 0 }; 8092yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8093yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8094yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8147yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8148yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8149yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8530yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8531yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8532yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8574yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8575yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8576yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8627yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8628yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8629yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1 }; 8736yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 8737yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 8738yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1, 1 }; 8797yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 8798yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 8799yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 1, 1 }; 8862yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8863yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8864yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8865yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8919yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8920yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8921yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8922yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8985yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1 }; 8986yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8987yield return new object[] { new Size(2, 3), new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 8988yield return new object[] { new Size(2, 3), new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1 }; 9044yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 9045yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9046yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9047yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9132yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 1, 1 }; 9133yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9134yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 }; 9135yield return new object[] { new Size(int.MaxValue, int.MaxValue), new Size(ushort.MaxValue, ushort.MaxValue), 1, 1 };
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (1)
473FillWeight = ushort.MaxValue - 99
System\Windows\Forms\ScrollBarTests.cs (2)
2820yield return new object[] { msg, RightToLeft.No, 10, ScrollEventType.SmallDecrement - 1, 10, (ScrollEventType)ushort.MaxValue }; 2821yield return new object[] { msg, RightToLeft.Yes, 10, ScrollEventType.SmallDecrement - 1, 10, (ScrollEventType)ushort.MaxValue };
System\Windows\Forms\UpDownBaseTests.cs (15)
1094yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), 120, 0 }; 1095yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), 120, 0 }; 1096yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), 120, 0 }; 1138yield return new object[] { new Size(ushort.MaxValue - 1, ushort.MaxValue - 1), ushort.MaxValue - 1, 1 }; 1139yield return new object[] { new Size(ushort.MaxValue, ushort.MaxValue), ushort.MaxValue, 1 }; 1140yield return new object[] { new Size(ushort.MaxValue + 1, ushort.MaxValue + 1), ushort.MaxValue + 1, 1 };
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ScreenRecordService.cs (1)
489if (delay.TotalMilliseconds > ushort.MaxValue)