575 references to Max
dotnet-user-jwts (1)
Helpers\ConsoleTable.cs (1)
61var equalColumnLengths = Math.Max((Console.WindowWidth / _columns.Count) - EXCESS_LENGTH_CREATED_BY_BORDERS, 5);
http2cat (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
IIS.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
IIS.LongTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
IIS.NewHandler.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
IIS.NewShim.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
IISExpress.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
ILCompiler.DependencyAnalysisFramework (1)
DependencyAnalyzer.cs (1)
226int dependencyPhase = Math.Max(node.DependencyPhaseForDeferredStaticComputation, _currentDependencyPhase);
Microsoft.Arcade.Test.Common (1)
DiffUtil.cs (1)
211int max = Math.Max(lengthA, lengthB);
Microsoft.AspNetCore.App.Analyzers (1)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNode.cs (1)
103end = Math.Max(token.VirtualChars.Last().Span.End, end);
Microsoft.AspNetCore.Components (2)
src\Components\Shared\src\ArrayBuilder.cs (2)
90var candidateCapacity = Math.Max(_items.Length * 2, _minCapacity); 179var newCapacity = Math.Max(desiredCapacity, _minCapacity);
Microsoft.AspNetCore.Components.Server (6)
BlazorPack\SequenceOfT.cs (1)
223sizeHint = Math.Max(this.MinimumSpanLength, sizeHint);
Circuits\RemoteJSRuntime.cs (1)
148_byteArraysToBeRevivedTotalBytes += Math.Max(4, data.Length);
src\Components\Shared\src\ArrayBuilder.cs (2)
90var candidateCapacity = Math.Max(_items.Length * 2, _minCapacity); 179var newCapacity = Math.Max(desiredCapacity, _minCapacity);
src\Shared\PooledArrayBufferWriter.cs (1)
157var growBy = Math.Max(sizeHint, _rentedBuffer.Length);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.Components.Web (5)
Virtualization\Virtualize.cs (5)
252_lastRenderedPlaceholderCount = Math.Max(0, lastItemIndex - _itemsBefore - _lastRenderedItemCount); 264var itemsAfter = Math.Max(0, _itemCount - _visibleItemCapacity - _itemsBefore); 296var itemsBefore = Math.Max(0, _itemCount - itemsAfter - visibleItemCapacity); 329itemsInSpacer = Math.Max(0, (int)Math.Floor(spacerSize / _itemSize) - OverscanCount); 339itemsBefore = Math.Max(0, _itemCount - visibleItemCapacity);
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\ArrayBuilder.cs (2)
90var candidateCapacity = Math.Max(_items.Length * 2, _minCapacity); 179var newCapacity = Math.Max(desiredCapacity, _minCapacity);
Microsoft.AspNetCore.DataProtection.Tests (1)
TypeForwardingActivatorTests.cs (1)
128new Version(Math.Max(0, current.Major - 1), 0, 0, 0),
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
149var preErrorLineNumberInFile = Math.Max(errorStartLineNumberInFile - _sourceCodeLineCount, 1);
Microsoft.AspNetCore.Hosting (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
149var preErrorLineNumberInFile = Math.Max(errorStartLineNumberInFile - _sourceCodeLineCount, 1);
Microsoft.AspNetCore.Http.Abstractions (5)
Routing\RouteValueDictionary.cs (2)
680capacity = Math.Max(DefaultCapacity, Math.Max(storage.Properties.Length, capacity));
src\Shared\ValueStringBuilder\ValueListBuilder.cs (3)
78int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 88nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
Microsoft.AspNetCore.Http.Connections (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.Http.Extensions (3)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (3)
78int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 88nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
Microsoft.AspNetCore.HttpLogging (4)
BufferingStream.cs (1)
184sizeHint = Math.Max(MinimumBufferSize, sizeHint);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (3)
78int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 88nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
Microsoft.AspNetCore.HttpOverrides (4)
ForwardedHeadersMiddleware.cs (4)
133entryCount = Math.Max(forwardedFor.Length, entryCount); 145entryCount = Math.Max(forwardedProto.Length, entryCount); 159entryCount = Math.Max(forwardedHost.Length, entryCount); 174entryCount = Math.Max(forwardedPrefix.Length, entryCount);
Microsoft.AspNetCore.InternalTesting (1)
xunit\AspNetTestRunner.cs (1)
80var numAttempts = Math.Max(1, retryAttribute.MaxRetries);
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
NonSeekableReadableStream.cs (2)
66count = Math.Max(count, 1); 72count = Math.Max(count, 1);
Microsoft.AspNetCore.Mvc.TagHelpers (2)
GlobbingUrlBuilder.cs (2)
202var compareLength = Math.Max(xLength, yLength); 245var length = Math.Max(xSegment.Length, ySegment.Length);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Buffers\MemoryPoolViewBufferScope.cs (1)
58segment = _viewBufferPool.Rent(Math.Max(pageSize, MinimumSize));
src\Shared\PooledArrayBufferWriter.cs (1)
157var growBy = Math.Max(sizeHint, _rentedBuffer.Length);
Microsoft.AspNetCore.OpenApi (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.OutputCaching (2)
RecyclableArrayBufferWriter.cs (2)
94int growBy = Math.Max(sizeHint, currentLength); 98growBy = Math.Max(growBy, DefaultInitialBufferSize);
Microsoft.AspNetCore.Routing (5)
ArrayBuilder.cs (2)
155nextCapacity = Math.Max(capacity + 1, MaxCoreClrArrayLength); 158nextCapacity = Math.Max(nextCapacity, minimum);
Matching\DfaMatcherBuilder.cs (2)
84maxDepth = Math.Max(maxDepth, endpoint.RoutePattern.PathSegments.Count); 560maxSegmentCount = Math.Max(maxSegmentCount, node.PathDepth);
Matching\NegotiationMatcherPolicy.cs (1)
161bestMatchIndex = Math.Max(bestMatchIndex, 0);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Matching\JumpTableMultipleEntryBenchmark.cs (1)
156var text = guid.Substring(0, Math.Max(5, Math.Min(i, 36)));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
149var preErrorLineNumberInFile = Math.Max(errorStartLineNumberInFile - _sourceCodeLineCount, 1);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Infrastructure\PipeWriterHelpers\ConcurrentPipeWriter.cs (1)
387sizeHint = Math.Max(MinimumBufferSize, sizeHint);
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
Microsoft.AspNetCore.SignalR.Client.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Common (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.WebSockets (3)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (3)
78int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 88nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
Microsoft.AspNetCore.WebUtilities (4)
FileBufferingReadStream.cs (1)
432bufferSize = Math.Max(4096, bufferSize);
MultipartReaderStream.cs (3)
325matchOffset = Math.Max(segment1.Offset, segment1.Offset + segment1.Count - matchBytes.Length); 352bufferSize = Math.Max(4096, bufferSize); 361bufferSize = Math.Max(4096, bufferSize);
Microsoft.AspNetCore.WebUtilities.Tests (2)
NonSeekableReadStream.cs (2)
59count = Math.Max(count, 1); 65count = Math.Max(count, 1);
Microsoft.Build (13)
BackEnd\Client\MSBuildClient.cs (1)
623NodeProviderOutOfProcBase.ConnectToPipeStream(_nodeStream, _pipeName, _handshake, Math.Max(1, timeoutMilliseconds - (int)sw.ElapsedMilliseconds));
BackEnd\Components\Logging\LoggingService.cs (1)
1788int newMinImportance = Math.Max((int)_minimumRequiredMessageImportance, (int)minimumImportance);
BackEnd\Components\Scheduler\Scheduler.cs (4)
1303configurationCountLimit = Math.Max(1, (int)Math.Ceiling(configurationCountLimit * _customSchedulerForSQLConfigurationLimitMultiplier / _availableNodes.Count)); 1408int implicitlyGrantedCores = Math.Max(1, (_schedulingData.ExecutingRequestsCount * _nodeCoreAllocationWeight) / 100); 1413return Math.Max(0, _coreLimit - (implicitlyGrantedCores + explicitlyGrantedCores)); 2502int postPad = Math.Max(20 /* field width */ - (2 * level) /* spacing for hierarchy lines */ - 3 /* length allocated for config/request id */, 0);
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
418MaximumConfigurationId = Math.Max(MaximumConfigurationId, configId);
FileMatcher.cs (1)
2576var maxTasks = Math.Max(1, NativeMethodsShared.GetLogicalCoreCount() / 2);
FileUtilities.cs (1)
397var headingSegmentsToRemove = Math.Max(0, segments.Length - trailingSegmentsToKeep);
Instance\ProjectInstance.cs (2)
3059_importPaths = new List<string>(Math.Max(0, importClosure.Count - 1) /* outer project */); 3071_importPathsIncludingDuplicates = new List<string>(Math.Max(0, importClosureWithDuplicates.Count - 1) /* outer project */);
NodeEndpointOutOfProcBase.cs (1)
365int waitTimeRemaining = Math.Max(0, CommunicationsUtilities.NodeConnectionTimeout - (int)usedWaitTime.TotalMilliseconds);
Utilities\NuGetFrameworkWrapper.cs (1)
114return version.ToString(Math.Max(nonZeroVersionParts, minVersionPartCount));
Microsoft.Build.Engine.OM.UnitTests (1)
FileUtilities.cs (1)
397var headingSegmentsToRemove = Math.Max(0, segments.Length - trailingSegmentsToKeep);
Microsoft.Build.Tasks.Core (2)
FileMatcher.cs (1)
2576var maxTasks = Math.Max(1, NativeMethodsShared.GetLogicalCoreCount() / 2);
FileUtilities.cs (1)
397var headingSegmentsToRemove = Math.Max(0, segments.Length - trailingSegmentsToKeep);
Microsoft.Build.Utilities.Core (2)
FileMatcher.cs (1)
2576var maxTasks = Math.Max(1, NativeMethodsShared.GetLogicalCoreCount() / 2);
FileUtilities.cs (1)
397var headingSegmentsToRemove = Math.Max(0, segments.Length - trailingSegmentsToKeep);
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\DiffUtil.cs (1)
211int max = Math.Max(lengthA, lengthB);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\RecyclableArrayBufferWriter.cs (2)
163var growBy = Math.Max(sizeHint, currentLength); 167growBy = Math.Max(growBy, DefaultInitialBufferSize);
Microsoft.Extensions.Caching.MicroBenchmarks (2)
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (2)
163var growBy = Math.Max(sizeHint, currentLength); 167growBy = Math.Max(growBy, DefaultInitialBufferSize);
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\CallSiteFactory.cs (1)
367return (CallSiteResultCacheLocation)Math.Max((int)locationA, (int)locationB);
Microsoft.Extensions.FileProviders.Physical (1)
PollingWildCardChangeToken.cs (1)
169_byteBuffer = new byte[Math.Max(byteCount, 256)];
Microsoft.Extensions.Logging.Console (2)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (2)
186sizeHint = Math.Max(sizeHint, MaximumBufferSize - currentLength); 191int growBy = Math.Max(sizeHint, currentLength);
Microsoft.Extensions.Logging.Generators (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
Microsoft.Interop.SourceGeneration (2)
UseSiteAttributeProvider.cs (2)
51_maxIndirectionLevelDataProvided = Math.Max(_maxIndirectionLevelDataProvided, indirectionDepth); 81_maxIndirectionLevelUsed = Math.Max(indirectionDepth, _maxIndirectionLevelUsed);
Microsoft.JSInterop (2)
src\Components\Shared\src\ArrayBuilder.cs (2)
90var candidateCapacity = Math.Max(_items.Length * 2, _minCapacity); 179var newCapacity = Math.Max(desiredCapacity, _minCapacity);
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\CompilerServices\LikeOperator.vb (1)
1543SourceIndex = Math.Max(SourceIndex, PatternGroups(PGIndex).MinSourceIndex + 1)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (3)
1313For ParmIndex = 0 To Math.Min(ArgCountUpperBound, Math.Max(LastNonSetValueIndex0, LastNonSetValueIndex1)) 1785For ParmIndex = 0 To Math.Max(LastArgNonSetValueIndex, LastParamNonSetValueIndex) 1858Dim ArrayUBound As Integer = Math.Max(vars.GetUpperBound(0), paramOrder.GetUpperBound(0))
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
1300Dim BufferSize As Integer = Math.Max(MaxByteDetectedEncoding, DEFAULT_BUFFER_SIZE)
MonoTargetsTasks (1)
EmitBundleTask\EmitBundleBase.cs (1)
156int allowedParallelism = Math.Max(Math.Min(bundledResources.Count, Environment.ProcessorCount), 1);
MSBuild (3)
CommunicationsUtilities.cs (1)
522timeout = Math.Max(timeout, 50);
FileUtilities.cs (1)
397var headingSegmentsToRemove = Math.Max(0, segments.Length - trailingSegmentsToKeep);
NodeEndpointOutOfProcBase.cs (1)
365int waitTimeRemaining = Math.Max(0, CommunicationsUtilities.NodeConnectionTimeout - (int)usedWaitTime.TotalMilliseconds);
MSBuildTaskHost (2)
Concurrent\ConcurrentDictionary.cs (1)
440_budget = Math.Max(1, newBuckets.Length / newLocks.Length);
NodeEndpointOutOfProcBase.cs (1)
365int waitTimeRemaining = Math.Max(0, CommunicationsUtilities.NodeConnectionTimeout - (int)usedWaitTime.TotalMilliseconds);
PresentationCore (44)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
932int larger = Math.Max(lastChar, firstChar);
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (3)
163uint ulAbsMaxDelDel = (uint)Math.Max(MathHelper.AbsNoThrow(minDelDel), MathHelper.AbsNoThrow(maxDelDel)); 165uint ulAbsMax = (uint)Math.Max(MathHelper.AbsNoThrow(minVal), MathHelper.AbsNoThrow(maxVal)); 296ulAbsMax = (uint)Math.Max(MathHelper.AbsNoThrow(minInt), MathHelper.AbsNoThrow(maxInt));
MS\Internal\TextFormatting\Bidi.cs (2)
1613lengthResolved = Math.Max(startOfNeutrals, startOfDelayed) == PositionInvalid ? 1616(Math.Max(startOfNeutrals, startOfDelayed)) :
MS\Internal\TextFormatting\FormatSettings.cs (2)
141_maxLineWidth = Math.Max(maxLineWidth, 0); 178formatWidth = Math.Max(formatWidth, 0);
MS\Internal\TextFormatting\LineServicesCallbacks.cs (4)
2016int expandedBy = Math.Max(0, interWordAdjustTo - adjustedCharWidth); 2023pplsAdjustRight[0][i] = Math.Max(0, adjustedCharWidth - interWordAdjustTo); 2149pplsCompressionRight[0][igi + i] = Math.Max(0, glyphAdvance - interWordCompressTo); 2282int expandedBy = Math.Max(0, interWordExpandTo - glyphAdvance);
MS\Internal\TextFormatting\SimpleTextLine.cs (2)
853int first = Math.Max(ich, dcp) + _cpFirst; 1221cpVisible = Math.Max(cpRunStart, cp);
MS\Internal\TextFormatting\TextFormatterImp.cs (2)
730value = Math.Max(value, 1); 751value = Math.Max(value, 1);
MS\Internal\TextFormatting\TextMetrics.cs (1)
185int lscpFirstIndependence = Math.Max(
MS\Internal\TextFormatting\TextStore.cs (8)
524int effectedRangeStart = Math.Max(cpFetched - offset, bounds[0].Position); 569currentPosition = Math.Max(currentPosition, bounds[i + 1].Position); 1973textTop = Math.Max(textTop, lsrun.BaselineOffset); 1974textBottom = Math.Max(textBottom, lsrun.Descent); 1994textBottom = Math.Max(textBottom, lsrun.Height + top); 1998textBottom = Math.Max(textBottom, lsrun.Height + textTop); 2062cellAscent = Math.Max(cellAscent, lsrun.BaselineOffset - move); 2063cellDescent = Math.Max(cellDescent, lsrun.Descent + move);
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (2)
127Size mouseDoubleTapDefault = new Size(Math.Max(1, MS.Win32.SafeSystemMetrics.DoubleClickDeltaX / 2), 128Math.Max(1, MS.Win32.SafeSystemMetrics.DoubleClickDeltaY / 2));
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (4)
281Size mouseDragDefault = new Size(Math.Max(1, SafeSystemMetrics.DragDeltaX / 2), 282Math.Max(1, SafeSystemMetrics.DragDeltaY / 2)); 283Size mouseDoubleTapDefault = new Size(Math.Max(1, SafeSystemMetrics.DoubleClickDeltaX / 2), 284Math.Max(1, SafeSystemMetrics.DoubleClickDeltaY / 2));
System\Windows\Markup\XmlLanguage.cs (1)
431specificity = Math.Max(GetSubtagCount(languageTag), 1 + GetSpecificity(culture.Parent, maxDepth - 1));
System\Windows\Media\Animation\ClockGroup.cs (1)
205desiredFrameRate = Math.Max(desiredFrameRate, currentDesiredFrameRate.Value);
System\Windows\Media\FamilyTypeface.cs (1)
316pAdvances[i] = Math.Max(0, (int)((metrics.BlackBoxWidth + metrics.LeftSideBearing + metrics.RightSideBearing) * emSize));
System\Windows\Media\FormattedText.cs (1)
1650int x0 = Math.Max(enumerator.Position, startIndex);
System\Windows\Media\GlyphsSerializer.cs (1)
72Math.Max(
System\Windows\Media\MatrixStack.cs (4)
86_highWaterMark = Math.Max(_highWaterMark, _size); 124_highWaterMark = Math.Max(_highWaterMark, _size); 154_highWaterMark = Math.Max(_highWaterMark, _size); 197int newSize = Math.Max(_highWaterMark, s_initialSize);
System\Windows\Media\MediaContext.cs (1)
771_animationRenderRate = Math.Max(_adjustedRefreshRate, _timeManager.GetMaxDesiredFrameRate());
System\Windows\Media\RenderData.cs (1)
485int newSize = Math.Max((_buffer.Length << 1) - (_buffer.Length >> 1), cbRequiredSize);
System\Windows\Media\textformatting\CharacterBufferReference.cs (1)
91int maxOffset = (charBuffer == null) ? 0 : Math.Max(0, charBuffer.Count - 1);
System\Windows\Media\VisualCollection.cs (1)
246InternalCapacity = Math.Max(min, (int)(InternalCapacity * c_growFactor));
PresentationFramework (133)
MS\Internal\Documents\ContentElementCollection.cs (1)
671PrivateCapacity = Math.Max(min, PrivateCapacity * 2);
MS\Internal\Documents\DocumentGrid.cs (1)
1452visiblePages.Add(_childrenCollection[_firstPageVisualIndex + j - Math.Max(0, firstPage)]);
MS\Internal\Documents\IFlowDocumentViewer.cs (1)
834GoToPage(Math.Max(1, MasterPageNumber - 2));
MS\Internal\Documents\RowCache.cs (2)
543_layoutColumns = Math.Max(1, _layoutColumns); 657pivotPage = Math.Max(0, PageCache.PageCount - columns);
MS\Internal\Documents\TextBoxView.cs (10)
705firstLineIndex = Math.Max(firstLineIndex, GetLineIndexFromOffset(startOffset, LogicalDirection.Forward)); 775int nextLineIndex = Math.Max(0, Math.Min(_lineMetrics.Count - 1, lineIndex + count)); 2049int startOffset = Math.Max(_lineMetrics[lineIndex].Offset, unclippedStartOffset); 2145int startOffset = Math.Max(lineStartOffset, unclippedStartOffset); 2208firstLineIndex = Math.Max(0, Math.Min(firstLineIndex, _lineMetrics.Count - 1)); 2209lastLineIndex = Math.Max(0, Math.Min(lastLineIndex, _lineMetrics.Count - 1)); 2555int lastCoveredCharOffset = range.StartIndex + Math.Max(range.PositionsAdded, range.PositionsRemoved); 2714int lineIndex = Math.Max(oldLineVisualsIndex, firstLineIndex); 2809count = Math.Max(0, count); 2993int rangeStart = Math.Max(viewportStart, selectionStart);
MS\Internal\Documents\TextContainerHelper.cs (3)
203_cpLast = Math.Max(_cpLast, cpLast); 228_ranges[i * 2 + 1] = Math.Max(_ranges[i * 2 + 1], cpLast); 250_ranges[pos * 2 + 1] = Math.Max(_ranges[pos * 2 + 1], _ranges[(pos + 1) * 2 + 1]);
MS\Internal\Documents\TextParagraphView.cs (2)
167lineIndex = Math.Max(0, lineIndex + count); 578lineIndex = Math.Max(Math.Min((int)(point.Y / approximatedLineHeight), lines.Count - 1), 0);
MS\Internal\PtsHost\ContainerParaClient.cs (2)
66_rect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du); 67_rect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv);
MS\Internal\PtsHost\ContainerParagraph.cs (8)
528fsrcToFillSubtrack.u = Math.Max(Math.Min(fsrcToFillSubtrack.u, fsrcToFill.u + fsrcToFill.du - 1), fsrcToFill.u); 529fsrcToFillSubtrack.du = Math.Max(fsrcToFillSubtrack.du, 0); 542fsrcToFillSubtrack.v = Math.Max(Math.Min(fsrcToFillSubtrack.v, fsrcToFill.v + fsrcToFill.dv - 1), fsrcToFill.v); 543fsrcToFillSubtrack.dv = Math.Max(fsrcToFillSubtrack.dv, 0); 686urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack); 687durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0); 816urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack); 817durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0);
MS\Internal\PtsHost\FigureParaClient.cs (4)
84_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 86_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 89_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 91_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
MS\Internal\PtsHost\FigureParagraph.cs (2)
161int subpageWidth = Math.Max(1, TextDpi.ToTextDpi(anchorLimitedWidth) - (mbp.BPLeft + mbp.BPRight)); 170int subpageHeight = Math.Max(1, TextDpi.ToTextDpi(anchorLimitedHeight) - (mbp.BPTop + mbp.BPBottom));
MS\Internal\PtsHost\FloaterParaClient.cs (4)
205_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 207_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 210_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 212_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
MS\Internal\PtsHost\FloaterParagraph.cs (4)
235subpageHeight = Math.Max(1, dvrAvailable - (mbp.MBPTop + mbp.MBPBottom)); 668subpageWidth = Math.Max(1, durSpecified - (mbp.BPLeft + mbp.BPRight)); 673subpageWidth = Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight)); 679subpageWidth = Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight));
MS\Internal\PtsHost\Line.cs (1)
110dvrSuppressible = Math.Max(0, TextDpi.ToTextDpi(_line.OverhangAfter));
MS\Internal\PtsHost\MarginCollapsingState.cs (1)
167_maxPositive = Math.Max(_maxPositive, mcs._maxPositive);
MS\Internal\PtsHost\PtsHelper.cs (5)
838return Math.Max(1, Math.Min(PTS.Restrictions.tscColumnRestriction-1, columns)); // at least 1 column is required 928pfscolinfo[i].durBefore = Math.Max(0, pfscolinfo[i].durBefore); 929pfscolinfo[i].durWidth = Math.Max(1, pfscolinfo[i].durWidth); 960pfscolinfo[i].durBefore = Math.Max(0, pfscolinfo[i].durBefore); 961pfscolinfo[i].durWidth = Math.Max(1, pfscolinfo[i].durWidth);
MS\Internal\PtsHost\PtsPage.cs (1)
778rect.dv = Math.Max(rect.dv, bbox.fsrc.dv);
MS\Internal\PtsHost\SubpageParaClient.cs (4)
97_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 99_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 102_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 104_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
MS\Internal\PtsHost\SubpageParagraph.cs (16)
182subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 191subpageHeight = Math.Max(1, subpageHeight - (marginTop + mbp.BPTop)); 245dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 246fsrcToFill.du = Math.Max(fsrcToFill.du, fsbbox.fsrc.du + fsbbox.fsrc.u); 289fsbbox.fsrc.du = Math.Max(fsrcToFill.du - (mbp.MarginLeft + mbp.MarginRight), 0); 290fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0); 369subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 441dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 442durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u); 452fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0); 453fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0); 529subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 600dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 601durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u); 611fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0); 612fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0);
MS\Internal\PtsHost\TableParaClient.cs (2)
2426Math.Max(_rect.du - (mbpInfo.BPRight + mbpInfo.BPLeft), 1), 2427Math.Max(_rect.dv - calculatedBPBottom - calculatedBPTop, 1)
MS\Internal\PtsHost\TextParaClient.cs (9)
745int dcpStart = Math.Max(cpStartTextPointer, cpParagraphStart) - cpParagraphStart; 1414int countVisualsShiftBeforeChange = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual, 0), lineVisuals.Count); 1431int actualLinesToRemove = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual + cLinesToRemove, 0), lineVisuals.Count); 1879int dcpRangeStartForThisLine = Math.Max(lineDesc.dcpFirst, dcpStart); 1882int cchRangeForThisLine = Math.Max(Math.Min(lineDesc.dcpLim, dcpEnd) - dcpRangeStartForThisLine, 1); 1989int dcpRangeStartForThisElem = Math.Max(elemDesc.dcpFirst, dcpStart); 1992int cchRangeForThisElem = Math.Max(Math.Min(elemDesc.dcpLim, dcpEnd) - dcpRangeStartForThisElem, 1); 3133line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, lineDesc.dcpFirst), Math.Min(dcpEnd, lineDesc.dcpLim)); 3195line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, element.dcpFirst), Math.Min(dcpEnd, element.dcpLim));
MS\Internal\PtsHost\UIElementParaClient.cs (2)
80_rect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du); 81_rect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv);
MS\Internal\PtsHost\UIElementParagraph.cs (1)
390double elementWidth = TextDpi.FromTextDpi(Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight)));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
362return Math.Max(0, this.OwningGrid.RowDefinitions.Count - 1);
System\Windows\Controls\ColumnDefinition.cs (1)
646PrivateSetCapacity(Math.Max(_items.Length * 2, c_defaultCapacity));
System\Windows\Controls\DataGrid.cs (5)
5733nextDisplayIndex = Math.Max(0, InternalColumns.LastVisibleDisplayIndex); 5814nextRowIndex = Math.Max(0, Items.Count - 1); 5999index = Math.Max(0, Math.Min(numItems - 1, index + (shiftModifier ? -1 : 1))); 6142int jumpDistance = Math.Max(1, (int)scrollHost.ViewportHeight - 1); 6144targetIndex = Math.Max(0, Math.Min(targetIndex, Items.Count - 1));
System\Windows\Controls\Grid.cs (5)
2878Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length)); 3083int requiredLength = Math.Max(DefinitionsU.Length, DefinitionsV.Length) * 2; 3116int requiredLength = Math.Max(Math.Max(DefinitionsU.Length, DefinitionsV.Length), 1) * 2; 3134int requiredLength = Math.Max(DefinitionsU.Length, DefinitionsV.Length);
System\Windows\Controls\Primitives\Popup.cs (2)
2708return new Rect(mousePoint.x, mousePoint.y - 1, Math.Max(0, cursorWidth - hotX), Math.Max(0, cursorHeight - hotY + 2));
System\Windows\Controls\PrintDialog.cs (1)
315Math.Max((int)dlg.MinPage, _pageRange.PageFrom),
System\Windows\Controls\RowDefinition.cs (1)
646PrivateSetCapacity(Math.Max(_items.Length * 2, c_defaultCapacity));
System\Windows\Controls\Stack.cs (1)
1001iNewOffset = Math.Max(Math.Min(numberOfItems - 1, iNewOffset), 0);
System\Windows\Controls\TextBlock.cs (1)
2331int dcpStart = Math.Max(dcpLineStart, dcpPositionStart);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (6)
613int left = Math.Max(Left, region.Left); 614int top = Math.Max(Top, region.Top); 688Right = Math.Max(prevRight, region.Right); 689Bottom = Math.Max(prevBottom, region.Bottom); 729int top = Math.Max(Top, region.Top); 737int top = Math.Max(Top, region.Top);
System\Windows\Controls\VirtualizingStackPanel.cs (6)
2338excludeCount = Math.Max(excludeCount, 2689_firstItemInExtendedViewportIndex = Math.Max(_firstItemInExtendedViewportIndex - 1, 0); 2691_firstItemInExtendedViewportChildIndex = Math.Max(_firstItemInExtendedViewportChildIndex, 0); 4984itemsInExtendedViewportCount = Math.Max(calcItemsInExtendedViewportCount, itemsInExtendedViewportCount); 9544return Math.Max(0, _firstItemInExtendedViewportIndex); 11239else if (childIndex > firstChildInView + Math.Max(viewportSize - 1, 0))
System\Windows\Documents\FixedPageStructure.cs (1)
138line = Math.Max(0, Math.Min(line, _lineResults.Length - 1));
System\Windows\Documents\Glyphs.cs (1)
534estimatedNumberOfGlyphs = Math.Max(estimatedNumberOfGlyphs, glyphsProp.Length / 5);
System\Windows\Documents\RangeContentEnumerator.cs (1)
308newBuffer = new char[Math.Max(2*_buffer.Length, size)];
System\Windows\Documents\Speller.cs (2)
1201sTextRange = (SpellerInteropBase.ITextRange)segments[Math.Max(i, 0)]; 1212contextOffset = Math.Max(sTextRange.Start + sTextRange.Length, contentOffset);
System\Windows\Documents\TableRowGroup.cs (1)
228_columnCount = Math.Max(_columnCount, Rows[i].ColumnCount);
System\Windows\Documents\TextContainerChangedEventArgs.cs (2)
240change.RemovedLength += Math.Max(0, length - change.AddedLength); 241change.AddedLength = Math.Max(0, change.AddedLength - length);
System\windows\Documents\TextEditor.cs (2)
524_mouseSelectionState.Timer.Interval = TimeSpan.FromMilliseconds(Math.Max(SystemParameters.MenuShowDelay, 200)); 1191int extraCharsAllowed = Math.Max(0, this.MaxLength - currentLength);
System\Windows\Documents\TextFindEngine.cs (1)
216int textBlockLength = Math.Max(TextBlockLength, findPattern.Length * 2 * 2);
System\Windows\Documents\TextRangeEditTables.cs (2)
336int lastRowIndex = Math.Max(anchorCell.Row.Index + anchorCell.RowSpan - 1, movingCell.Row.Index + movingCell.RowSpan - 1); 338int lastColumnIndex = Math.Max(anchorCell.ColumnIndex + anchorCell.ColumnSpan - 1, movingCell.ColumnIndex + movingCell.ColumnSpan - 1);
System\Windows\Documents\TextStore.cs (1)
3846int extraCharsAllowed = Math.Max(0, this.TextEditor.MaxLength - currentLength);
System\Windows\Markup\BamlRecordReader.cs (1)
1752defKeyList = new ArrayList(Math.Max (5, (int)(bamlRecord.ContentSize/400)));
System\Windows\Standard\NativeMethods.cs (2)
2051Right = Math.Max(rect1.Right, rect2.Right), 2052Bottom = Math.Max(rect1.Bottom, rect2.Bottom),
PresentationUI (5)
MS\Internal\Documents\CredentialManagerDialog.cs (1)
169int maxWidth = Math.Max(_addButton.Width, _removeButton.Width);
MS\Internal\Documents\SignatureSummaryDialog.cs (4)
575int h = Math.Max(Math.Max(Math.Max(Math.Max(IconHeight,heightSummary), heightIntent), heightLocale), heightSignBy);
ReachFramework (5)
MS\Internal\Printing\Configuration\COMPSTUISRID.cs (1)
42resString.Length = Math.Max(0, Math.Min(charCount, resString.Length));
PrintConfig\FallbackPTProvider.cs (1)
160defaultCopies = Math.Max(minCopies, Math.Min(defaultDevMode.Copies, maxCopies));
PrintConfig\PrintSchemaShim.cs (1)
1183return (short)Math.Max(min, Math.Min(value, max));
Serialization\Manager\ReachSerializationUtils.cs (2)
178System.Windows.DependencyProperty[] newList = new System.Windows.DependencyProperty[Math.Max(List.Length * 2, Count + delta)]; 185List = new System.Windows.DependencyProperty[Math.Max(delta, 2)];
SignalRSamples (1)
Hubs\UploadHub.cs (1)
44return $"{winner} wins with a total of {Math.Max(p1score, p2score)} points to {Math.Min(p1score, p2score)}";
Swaggatherer (1)
SwaggathererApplication.cs (1)
257var length = Math.Min(text.Length, Math.Max(5, part.Name.Length));
System.Collections (1)
System\Collections\Generic\PriorityQueue.cs (1)
624newcapacity = Math.Max(newcapacity, _nodes.Length + MinimumGrow);
System.Collections.Concurrent (4)
System\Collections\Concurrent\ConcurrentDictionary.cs (4)
238ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count), 239IReadOnlyCollection<KeyValuePair<TKey, TValue>> rc => Math.Max(DefaultCapacity, rc.Count), 682_budget = Math.Max(1, newTables._buckets.Length / newTables._locks.Length); 2020_budget = Math.Max(1, newBuckets.Length / newLocks.Length);
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
740int newCapacity = Math.Max(_elements.Length * 2, capacity);
System.ComponentModel.TypeConverter (2)
System\ComponentModel\EventDescriptorCollection.cs (1)
159int newSize = Math.Max(sizeNeeded, _events.Length * 2);
System\ComponentModel\PropertyDescriptorCollection.cs (1)
166int newSize = Math.Max(sizeNeeded, _properties.Length * 2);
System.Console (1)
System\TermInfo.Database.cs (1)
240lastEnd = Math.Max(end, lastEnd);
System.Data.Common (12)
System\Data\Common\DBCommandBuilder.cs (1)
241int maxPrefixLength = Math.Max(
System\Data\Common\Int32Storage.cs (1)
128max = Math.Max(_values[record], max);
System\Data\DataColumn.cs (1)
933_maxLength = Math.Max(value, -1);
System\Data\Filter\BinaryNode.cs (2)
1323DataTypePrecedence higherPrec = (DataTypePrecedence)Math.Max(leftPrecedence, rightPrecedence); 1437DataTypePrecedence higherPrec = (DataTypePrecedence)Math.Max(leftPrecedence, rightPrecedence);
System\Data\SQLTypes\SQLDecimal.cs (7)
1251ResInteger = Math.Max(x._bPrec - MyScale, y._bPrec - OpScale); 1255ResScale = Math.Max(MyScale, OpScale); 1467ResScale = Math.Max(ResScale, Math.Min(ActualScale, s_cNumeDivScaleMin)); 1688ResScale = Math.Max(x._bScale + y._bPrec + 1, s_cNumeDivScaleMin); 1701ResScale = Math.Max(ResScale, MinScale); 2297bNewPrec = (byte)(Math.Min(s_NUMERIC_MAX_PRECISION, Math.Max(1, lAdjust + _bPrec))); 3175lPosition = Math.Max(-s_NUMERIC_MAX_PRECISION, lPosition);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (1)
201return Math.Min(Math.Max(0, (int)(quantile * count)), count - 1);
System.Diagnostics.Process (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 151nextCapacity = Math.Max(nextCapacity, minimum);
System.Drawing.Primitives (4)
System\Drawing\Rectangle.cs (4)
290int x1 = Math.Max(a.X, b.X); 292int y1 = Math.Max(a.Y, b.Y); 316int x2 = Math.Max(a.X + a.Width, b.X + b.Width); 318int y2 = Math.Max(a.Y + a.Height, b.Y + b.Height);
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
171idx = Math.Max(0, nextStop - ContentByteCount);
System.Formats.Tar (1)
System\Formats\Tar\SeekableSubReadStream.cs (1)
54count = Math.Max(0, (int)(_endInSuperStream - _positionInSuperStream));
System.IO.Pipelines (3)
System\IO\Pipelines\Pipe.cs (1)
262sizeHint = Math.Max(MinimumSegmentSize, sizeHint);
System\IO\Pipelines\StreamPipeReader.cs (1)
537sizeHint = Math.Max(BufferSize, sizeHint);
System\IO\Pipelines\StreamPipeWriter.cs (1)
178sizeHint = Math.Max(_minimumBufferSize, sizeHint);
System.Linq (3)
System\Linq\SkipTake.SpeedOpt.cs (2)
258return Math.Max(_source.Count() - _minIndexInclusive, 0); 274return Math.Max((int)count - _minIndexInclusive, 0);
System\Linq\Take.cs (1)
184Math.Max(0, isStartIndexFromEnd ? count - startIndex : startIndex);
System.Linq.Expressions (4)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 151nextCapacity = Math.Max(nextCapacity, minimum);
System\Linq\Expressions\DebugViewWriter.cs (1)
203return (Flow)System.Math.Max((int)last, (int)flow);
System\Linq\Expressions\Interpreter\LocalVariables.cs (1)
76_maxLocalCount = Math.Max(_localCount, _maxLocalCount);
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
381return Math.Max(_childCount - _takeOrSkipOp._count, 0);
System.Memory (2)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (2)
214int growBy = Math.Max(sizeHint, currentLength); 218growBy = Math.Max(growBy, DefaultInitialBufferSize);
System.Net.Http (5)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (2)
580_stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; 629dst = new byte[Math.Max(stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))];
System\Net\Http\HttpContent.cs (2)
994Math.Max(value, Array.MaxLength) : 995Math.Max(value, (int)twiceLength);
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (1)
93var newArray = new QueueItem[Math.Max(4, _array.Length * 2)];
System.Net.HttpListener (1)
System\Net\Managed\HttpRequestStream.Managed.cs (1)
149ares._synchRead = Math.Max(0, nread);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
140int addressLength = stdout.AsSpan(Math.Max(addressStart, 0)).IndexOfAny(' ', ':');
System.Net.Requests (1)
System\Net\ServicePoint\ServicePointManager.cs (1)
90set { s_dnsRefreshTimeout = Math.Max(-1, value); }
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
57return Math.Max(1, (int)Math.Round(Environment.ProcessorCount / (double)coresPerEngine));
System.Net.WebSockets (2)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
49_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(payload.Length, MinInitialBufferLength));
System\Net\WebSockets\WebSocket.cs (1)
117return new ArraySegment<byte>(new byte[Math.Max(receiveBufferSize, sendBufferSize)]);
System.Numerics.Tensors (2)
System\Numerics\Tensors\netcore\TensorHelpers.cs (2)
101int newShapeIndex = Math.Max(shape1.Length, shape2Length) - 1; 102nint[] newShape = new nint[Math.Max(shape1.Length, shape2Length)];
System.Private.CoreLib (74)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 151nextCapacity = Math.Max(nextCapacity, minimum);
src\libraries\System.Private.CoreLib\src\System\CodeDom\Compiler\IndentedTextWriter.cs (1)
45set { _indentLevel = Math.Max(value, 0); }
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (1)
409newcapacity = Math.Max(newcapacity, _array.Length + MinimumGrow);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (1)
292millisecondsTillNextPoll = Math.Max(1, millisecondsTillNextPoll);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3436EventMetadata[] newValues = new EventMetadata[Math.Max(eventData.Length + 16, eventAttribute.EventId + 1)];
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (1)
26newIdentity = Math.Max(newIdentity, snapshot); // Should be redundant. as we only create descriptors once.
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (1)
346occurrences = Math.Max(occurrences, 3);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
690public static int Max(int x, int y) => Math.Max(x, y);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (2)
1035newLength = (uint)Math.Max(Array.MaxLength, rentedArray.Length + 1); 1238newLength = (uint)Math.Max(Array.MaxLength, buffer.Length + 1);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (2)
137int newCapacity = Math.Max(value, 256); 150newCapacity = Math.Max(value, Array.MaxLength);
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (1)
910sb.EnsureCapacity(Math.Max(relativeTo.Length, path.Length));
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (27)
615nMaxDigits = Math.Max(number.DigitsCount, DoublePrecision); 726nMaxDigits = Math.Max(number.DigitsCount, SinglePrecision); 821nMaxDigits = Math.Max(number.DigitsCount, HalfPrecision); 1623int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((uint)(-value))) + sNegative.Length; 1649int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((uint)(-value))) + sNegative.Length; 1678int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((uint)value)); 1697int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((uint)value)); 1734int bufferLength = Math.Max(digits, 32 - (int)uint.LeadingZeroCount(value)); 1753int bufferLength = Math.Max(digits, 32 - (int)uint.LeadingZeroCount(value)); 1952int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value)); 1988int bufferLength = Math.Max(digits, countedDigits); 2056int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((ulong)(-value))) + sNegative.Length; 2082int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((ulong)(-value))) + sNegative.Length; 2111int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((ulong)value)); 2130int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((ulong)value)); 2183int bufferLength = Math.Max(digits, 64 - (int)ulong.LeadingZeroCount(value)); 2202int bufferLength = Math.Max(digits, 64 - (int)ulong.LeadingZeroCount(value)); 2380int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value)); 2415int bufferLength = Math.Max(digits, countedDigits); 2484int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(absValue)) + sNegative.Length; 2512int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(absValue)) + sNegative.Length; 2543int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits(uValue)); 2564int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits(uValue)); 2593return Int64ToHexChars(buffer, lower, hexBase, Math.Max(digits, 1)); 2656return UInt64ToBinaryChars(buffer, lower, Math.Max(digits, 1)); 2742int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value)); 2756int bufferLength = Math.Max(digits, countedDigits);
src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (1)
993uint positiveExponent = (uint)(Math.Max(0, number.Scale));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
96Math.Max(MinimumArrayPoolLength, literalLength + (formattedCount * GuessedLengthPerHole));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (2)
42int spaceToAllocate = Math.Max(checked(sizeof(TUnmanagedElement) * numElements), 1); 148int spaceToAllocate = Math.Max(bufferSize, 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (2)
43int spaceToAllocate = Math.Max(checked(sizeof(TUnmanagedElement) * numElements), 1); 149int spaceToAllocate = Math.Max(bufferSize, 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
52int spaceToAllocate = Math.Max(checked(sizeof(TUnmanagedElement) * numElements), 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
47int spaceToAllocate = Math.Max(checked(sizeof(TUnmanagedElement) * numElements), 1);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
145maxValue = Math.Max(maxValue, childChar);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.Unix.cs (1)
19return Math.Max(length, 1) * sizeof(char);
src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (1)
55argsRequired = Math.Max(argsRequired, segment.ArgIndex + 1);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (6)
135capacity = Math.Max(capacity, length); 207persistedCapacity = Math.Min(Math.Max(DefaultCapacity, persistedString.Length), persistedMaxCapacity); 417int capacityToPreserve = Math.Min(Capacity, Math.Max(Length * 6 / 5, m_ChunkChars.Length)); 2230int curInChunk = Math.Max(startIndexInChunk, 0); 2561int newBlockLength = Math.Max(minBlockCharCount, Math.Min(Length, MaxChunkSize)); 2669StringBuilder newChunk = new StringBuilder(Math.Max(count, DefaultCapacity), chunk.m_MaxCapacity, chunk.m_ChunkPrevious);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (1)
327blocking_threadsPerDelayStep_procCountFactor = Math.Max(1, blocking_threadsPerDelayStep_procCountFactor);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (3)
189_legacy_minIOCompletionThreads = (short)Math.Max(1, ioCompletionThreads); 191short newMinThreads = (short)Math.Max(1, workerThreads); 311workerThreads = Math.Max(0, _maxThreads - counts.NumProcessingWork);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (2)
322newThreadWaveMagnitude = Math.Max(newThreadWaveMagnitude, 1); 344newThreadCount = Math.Max(minThreads, newThreadCount);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (1)
226int handleTimeoutDurationMs = Math.Max(0, registeredWait.TimeoutTimeMs - currentTimeMs);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
371return Math.Max(0, m_tailIndex - m_headIndex);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
222safeWaitHandles = new SafeWaitHandle[Math.Max(capacity,
src\System\Reflection\Emit\RuntimeILGenerator.cs (2)
90m_ILStream = new byte[Math.Max(size, DefaultSize)]; 261byte[] temp = new byte[Math.Max(m_ILStream.Length * 2, m_length + size)];
src\System\RuntimeType.CoreCLR.cs (2)
574newSize = Math.Max(Math.Max(4, 2 * cachedMembers.Length), list.Length);
System.Private.CoreLib.Generators (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
System.Private.DataContractSerialization (13)
System\Xml\XmlBinaryReader.cs (5)
881int maxLength = Math.Max(_maxBytesPerRead - maxTextNodeLength, 0); 893int actual = Math.Max(maxLength - maxTextNodeLength, 0); 951int maxLength = Math.Max(_maxBytesPerRead - maxTextNodeLength, 0); 963int actual = Math.Max(maxLength - maxTextNodeLength, 0); 993int maxBytesPerRead = Math.Max(_maxBytesPerRead - nodeLength, 0);
System\Xml\XmlBinaryReaderSession.cs (2)
43_strings = new XmlDictionaryString[Math.Max(id + 1, 16)]; 47XmlDictionaryString[] newStrings = new XmlDictionaryString[Math.Min(Math.Max(id + 1, _strings.Length * 2), MaxArrayEntries)];
System\Xml\XmlBinaryWriterSession.cs (2)
64IntArray keys = new IntArray(Math.Max(minCount, 16)); 247int[] newArray = new int[Math.Max(index + 1, _array.Length * 2)];
System\Xml\XmlBufferReader.cs (2)
228byte[] newBuffer = new byte[Math.Max(256, _buffer.Length * 2)]; 284_windowOffsetMax = Math.Max(windowOffset + windowLength, _offsetMax);
System\Xml\XmlCanonicalWriter.cs (2)
346_xmlnsBuffer = new byte[Math.Max(byteCount, 128)]; 350byte[] newBuffer = new byte[Math.Max(_xmlnsOffset + byteCount, _xmlnsBuffer.Length * 2)];
System.Private.Uri (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (2)
148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 151nextCapacity = Math.Max(nextCapacity, minimum);
System.Private.Xml (4)
System\Xml\Dom\XmlCharacterData.cs (2)
143count = Math.Max(len - offset, 0); 169count = Math.Max(len - offset, 0);
System\Xml\Xsl\Runtime\XslNumber.cs (1)
314int newLen = Math.Max(oldLen, minLen);
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
578idx += Math.Max(count - 4, 0);
System.Reflection.Emit (2)
System\Reflection\Emit\ILGeneratorImpl.cs (2)
41_builder = new BlobBuilder(Math.Max(size, DefaultSize)); 250_maxStackDepth = Math.Max(_maxStackDepth, _currentStackDepth);
System.Reflection.Metadata (6)
System\Reflection\Metadata\BlobBuilder.cs (3)
63_buffer = new byte[Math.Max(MinChunkSize, capacity)]; 68return new BlobBuilder(Math.Max(_buffer.Length, minimalSize)); 534var newChunk = AllocateChunk(Math.Max(newLength, MinChunkSize));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (3)
24return new HeapBlobBuilder(Math.Max(Math.Max(minimalSize, ChunkCapacity), _capacityExpansion)); 29_capacityExpansion = Math.Max(0, capacity - Count - FreeBytes);
System.Runtime.Caching (9)
System\Runtime\Caching\CacheExpires.cs (2)
142return Math.Max(0, (int)((utcExpires - _utcLastCountReset).Ticks / s_COUNT_INTERVAL.Ticks)); 390newLength = Math.Max(oldLength + MIN_PAGES_INCREMENT, newLength);
System\Runtime\Caching\CacheUsage.cs (1)
375newLength = Math.Max(oldLength + MIN_PAGES_INCREMENT, newLength);
System\Runtime\Caching\MemoryCacheStatistics.cs (2)
116return Math.Max(_physicalMemoryMonitor.GetPercentToTrim(_lastTrimTime, _lastTrimPercent), _cacheMemoryMonitor.GetPercentToTrim(_lastTrimTime, _lastTrimPercent)); 285int percent = Math.Max(minPercent, GetPercentToTrim());
System\Runtime\Caching\PhysicalMemoryMonitor.cs (3)
90percent = Math.Max(MinTotalMemoryTrimPercent, percent); 108_pressureHigh = Math.Max(3, physicalMemoryLimitPercentage); 109_pressureLow = Math.Max(1, _pressureHigh - 9);
System\Runtime\Caching\PhysicalMemoryMonitor.Unix.cs (1)
45return Math.Max(1, memoryLoad);
System.Runtime.Numerics (12)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
System\Number.BigInteger.cs (3)
369int remainingIntDigitCount = Math.Max(numberScale - totalDigitCount, 0); 775int charsIncludeDigits = Math.Max(digits, charsForBits); 939int strDigits = Math.Max(digits, valueDigits);
System\Numerics\BigInteger.cs (4)
2351size = Math.Max(x.Length, y.Length); 2407size = Math.Max(x.Length, y.Length); 2458size = Math.Max(x.Length, y.Length); 2587int zl = Math.Max(xl - digitShift, 0) + (trackSignBit ? 1 : 0);
System\Numerics\BigIntegerCalculator.PowMod.cs (2)
218int size = Math.Max(value.Length, bits.Length); 266int size = Math.Max(value.Length, bits.Length);
System.Runtime.Serialization.Formatters (5)
System\Runtime\Serialization\Formatters\Binary\BinaryUtilClasses.cs (4)
262int size = Math.Max(_negObjects.Length * 2, (-index) + 1); 269int size = Math.Max(_objects.Length * 2, index + 1); 339int size = Math.Max(_negObjects.Length * 2, (-index) + 1); 346int size = Math.Max(_objects.Length * 2, index + 1);
System\Runtime\Serialization\FormatterServices.cs (1)
157Array.Resize(ref parentTypes, Math.Max(parentTypeCount * 2, 12));
System.Security.Cryptography (6)
System\Security\Cryptography\LiteHashProvider.cs (2)
125maxRead = Math.Max(maxRead, read); 156maxRead = Math.Max(maxRead, read);
System\Security\Cryptography\LiteHashProvider.Xof.cs (1)
141maxRead = Math.Max(maxRead, read);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
1382int size = Math.Max(DefaultChainCapacity, errorDepth + 1); 1400LastError = Math.Max(errorDepth, LastError);
System\Security\Cryptography\XmlKeyHelper.cs (1)
81int idx = Math.Max(0, buf.Length - sizeof(int));
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
793byte[] buffer = ArrayPool<byte>.Shared.Rent(Math.Max(toBeSignedLength, CoseHelpers.ComputeSignatureSize(signer))); 869byte[] buffer = ArrayPool<byte>.Shared.Rent(Math.Max(toBeSignedLength, CoseHelpers.ComputeSignatureSize(signer)));
System.Text.Encodings.Web (4)
System\Text\Encodings\Web\TextEncoder.cs (4)
161int minBufferBumpEachIteration = Math.Max(MaxOutputCharactersPerInputCharacter, EncodeStartingOutputBufferSize); 166Span<char> destBuffer = stringBuilder.AppendSpan(Math.Max(remainingInput.Length, minBufferBumpEachIteration)); 520int minBufferBumpEachIteration = Math.Max(MaxOutputCharactersPerInputCharacter, EncodeStartingOutputBufferSize); 521char[] rentedArray = ArrayPool<char>.Shared.Rent(Math.Max(value.Length, minBufferBumpEachIteration));
System.Text.Json (11)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (2)
186sizeHint = Math.Max(sizeHint, MaximumBufferSize - currentLength); 191int growBy = Math.Max(sizeHint, currentLength);
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
117var adjacencyRow = new bool[Math.Max(nodes.Count, count)];
System\Text\Json\BitStack.cs (1)
138int nextDouble = Math.Max(minSize + 1, _array.Length * 2);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (2)
353ArrayPool<FoundProperty>.Shared.Rent(Math.Max(1, state.Current.JsonTypeInfo.PropertyCache!.Count)); 561argumentState.FoundPropertiesAsync = ArrayPool<FoundPropertyAsync>.Shared.Rent(Math.Max(1, state.Current.JsonTypeInfo.PropertyCache!.Count));
System\Text\Json\Serialization\ReadBufferState.cs (1)
25_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(initialBufferSize, JsonConstants.Utf8Bom.Length));
System\Text\Json\Serialization\WriteStack.cs (2)
314int stackSize = Math.Max(_count, _continuationCount); 352int stackSize = Math.Max(_count, _continuationCount);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
1069int sizeHint = Math.Max(DefaultGrowthSize, requiredSize); 1106int sizeHint = Math.Max(InitialGrowthSize, requiredSize);
System.Text.Json.SourceGeneration (1)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
117var adjacencyRow = new bool[Math.Max(nodes.Count, count)];
System.Text.RegularExpressions (10)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
System\Text\RegularExpressions\RegexInterpreterCode.cs (1)
234string Indent() => new string(' ', Math.Max(1, 25 - sb.Length));
System\Text\RegularExpressions\RegexNode.cs (2)
2420maxLength = Math.Max(maxLength, next); 2432Math.Max(yes, no) :
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
856int c = Math.Max(s1CharsLength, s1RangeLength).CompareTo(Math.Max(s2CharsLength, s2RangeLength));
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (1)
79newLength = Math.Max(2 * _sparse.Length, newLength);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (1)
231int newsize = Math.Max(_nfaCoreIdArray.Length * 2, InitialNfaStateCapacity);
System.Text.RegularExpressions.Generator (7)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (3)
180int nextCapacity = Math.Max(_span.Length != 0 ? _span.Length * 2 : 4, _span.Length + additionalCapacityRequired); 190nextCapacity = Math.Max(Math.Max(_span.Length + 1, ArrayMaxLength), _span.Length);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (2)
2420maxLength = Math.Max(maxLength, next); 2432Math.Max(yes, no) :
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
856int c = Math.Max(s1CharsLength, s1RangeLength).CompareTo(Math.Max(s2CharsLength, s2RangeLength));
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
217int replenishWindow = Math.Max(replenishAmount / _options.PermitLimit, 1);
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
224int replenishPeriods = Math.Max(replenishAmount / _options.TokensPerPeriod, 1);
System.Windows.Controls.Ribbon (8)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
596handleCount = Math.Max(0, handleCount);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (7)
368columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount); 380columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount); 387columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / arrangeWidth), childrenCount)), maxColumnCount); 396columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount); 403columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / _arrangeWidth), childrenCount)), maxColumnCount); 410columnCount = Math.Max(minColumnCount, Math.Min(childrenCount, maxColumnCount)); 572finalColumnCount = Math.Max(minColumnCount, Math.Min((int)(finalSize.Width / arrangeWidth), maxColumnCount));
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (1)
1527int newCapacity = Math.Max(newCount + (newCount >> 2), MINSIZE);
UIAutomationClientSideProviders (10)
MS\Internal\AutomationProxies\WindowsEditBox.cs (2)
369clientLocation.x = Math.Max(clientLocation.x, clientRect.left); 371clientLocation.y = Math.Max(clientLocation.y, clientRect.top);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (6)
134End = Math.Min(Math.Max(End, Start + 1), text.Length); 168End = Math.Min(Math.Max(End, Start + 1), text.Length); 476Math.Max(0, _provider.LineFromChar(End) - _provider.LinesPerPage() + 1); 688ArrayList rects = new ArrayList(Math.Max(endLine - startLine + 1, 0)); 943moved = Math.Max(count, -oneBasedIndex); 988int actualCount = Math.Max(count, -line);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (2)
82_range.SetRange(Math.Max(charRange.Start, paraRange.Start), Math.Min(charRange.End, paraRange.End)); 165int start = Math.Max(_range.Start, visibleRange.Start);
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (1)
171handleCount = Math.Max(0, handleCount);
WindowsFormsIntegration (2)
System\Windows\Integration\HostUtils.cs (2)
77Math.Max(size1.Width, size2.Width), 78Math.Max(size1.Height, size2.Height));