1435 references to Max
AnalyzerRunner (1)
Aspire.Dashboard (1)
Aspire.Hosting (1)
Aspire.Playground.Tests (1)
BuildActionTelemetryTable (1)
dotnet-svcutil-lib (20)
dotnet-user-jwts (1)
http2cat (3)
IIS.FunctionalTests (3)
IIS.LongTests (3)
IIS.NewHandler.FunctionalTests (3)
IIS.NewShim.FunctionalTests (3)
IISExpress.FunctionalTests (3)
Metrics (5)
Metrics.Legacy (5)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Web (6)
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.DataProtection.Tests (1)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Abstractions (5)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (3)
Microsoft.AspNetCore.HttpLogging (4)
Microsoft.AspNetCore.HttpOverrides (4)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Microsoft.AspNetCore.Shared.Tests (3)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Microsoft.AspNetCore.WebSockets (3)
Microsoft.AspNetCore.WebUtilities (4)
Microsoft.AspNetCore.WebUtilities.Tests (2)
Microsoft.Build (14)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Utilities.Core (2)
Microsoft.CodeAnalysis (36)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (13)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
Microsoft.CodeAnalysis.CodeStyle (24)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.CSharp (12)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (15)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Microsoft.CodeAnalysis.EditorFeatures (6)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Microsoft.CodeAnalysis.Features (6)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (31)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Microsoft.Data.Analysis (8)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.DotNet.XUnitAssert.Tests (12)
AsyncCollectionAssertsTests.cs (12)
754 var padding = Math.Max(expectedType.Length, actualType.Length);
792 var padding = Math.Max(expectedType.Length, actualType.Length);
873 var padding = Math.Max(expectedType.Length, actualType.Length);
925 var padding = Math.Max(expectedType.Length, actualType.Length);
965 var padding = Math.Max(expectedType.Length, actualType.Length);
1026 var padding = Math.Max(expectedType.Length, actualType.Length);
1141 var padding = Math.Max(expectedType.Length, actualType.Length);
1191 var padding = Math.Max(expectedType.Length, actualType.Length);
1232 var padding = Math.Max(expectedType.Length, actualType.Length);
1274 var padding = Math.Max(expectedType.Length, actualType.Length);
1332 var padding = Math.Max(expectedType.Length, actualType.Length);
1359 var padding = Math.Max(expectedType.Length, actualType.Length);
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.Caching.Hybrid (5)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Telemetry (4)
Microsoft.Interop.SourceGeneration (2)
Microsoft.JSInterop (2)
Microsoft.Maui.Controls (10)
Microsoft.Maui.Graphics (9)
Microsoft.ML.AutoML (1)
Microsoft.ML.Core (4)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (36)
Data\BufferBuilder.cs (4)
181Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(_count * 2)), 8));
183Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(_count * 2)), 8));
209Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(_count * 2)), 8));
211Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(_count * 2)), 8));
Microsoft.ML.FastTree (4)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (5)
Microsoft.ML.Mkl.Components (1)
Microsoft.ML.StandardTrainers (10)
Microsoft.ML.Sweeper (1)
Microsoft.ML.TimeSeries (12)
Microsoft.ML.Tokenizers (9)
Microsoft.ML.Tokenizers.Tests (12)
LlamaTests.cs (5)
308for (int i = 1; i < destinationBuffer.Length - 1; i += Math.Max(1, destinationBuffer.Length - 3)) // enough to test length 1, and destinationBuffer.Length - 2 only.
846for (int i = 1; i < destinationBuffer.Length - 1; i += Math.Max(1, destinationBuffer.Length - 3)) // enough to test length 1, and destinationBuffer.Length - 2 only.
860for (int i = 1; i < destinationBuffer.Length - 1; i += Math.Max(1, destinationBuffer.Length - 3)) // enough to test length 1, and destinationBuffer.Length - 2 only.
885for (int i = 1; i < destinationBuffer.Length - 1; i += Math.Max(1, destinationBuffer.Length - 3)) // enough to test length 1, and destinationBuffer.Length - 2 only.
899for (int i = 1; i < destinationBuffer.Length - 1; i += Math.Max(1, destinationBuffer.Length - 3)) // enough to test length 1, and destinationBuffer.Length - 2 only.
Microsoft.ML.Transforms (2)
Microsoft.VisualBasic.Core (5)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
MSBuild (3)
MSBuildTaskHost (2)
PresentationCore (44)
System\Windows\Media\GlyphsSerializer.cs (1)
52Math.Max(
PresentationFramework (133)
MS\Internal\Documents\TextBoxView.cs (10)
654firstLineIndex = Math.Max(firstLineIndex, GetLineIndexFromOffset(startOffset, LogicalDirection.Forward));
724int nextLineIndex = Math.Max(0, Math.Min(_lineMetrics.Count - 1, lineIndex + count));
2000int startOffset = Math.Max(_lineMetrics[lineIndex].Offset, unclippedStartOffset);
2096int startOffset = Math.Max(lineStartOffset, unclippedStartOffset);
2159firstLineIndex = Math.Max(0, Math.Min(firstLineIndex, _lineMetrics.Count - 1));
2160lastLineIndex = Math.Max(0, Math.Min(lastLineIndex, _lineMetrics.Count - 1));
2506int lastCoveredCharOffset = range.StartIndex + Math.Max(range.PositionsAdded, range.PositionsRemoved);
2665int lineIndex = Math.Max(oldLineVisualsIndex, firstLineIndex);
2751count = Math.Max(0, count);
2932int rangeStart = Math.Max(viewportStart, selectionStart);
MS\Internal\PtsHost\ContainerParagraph.cs (8)
504fsrcToFillSubtrack.u = Math.Max(Math.Min(fsrcToFillSubtrack.u, fsrcToFill.u + fsrcToFill.du - 1), fsrcToFill.u);
505fsrcToFillSubtrack.du = Math.Max(fsrcToFillSubtrack.du, 0);
518fsrcToFillSubtrack.v = Math.Max(Math.Min(fsrcToFillSubtrack.v, fsrcToFill.v + fsrcToFill.dv - 1), fsrcToFill.v);
519fsrcToFillSubtrack.dv = Math.Max(fsrcToFillSubtrack.dv, 0);
662urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack);
663durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0);
792urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack);
793durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0);
MS\Internal\PtsHost\SubpageParagraph.cs (16)
166subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight));
175subpageHeight = Math.Max(1, subpageHeight - (marginTop + mbp.BPTop));
229dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v);
230fsrcToFill.du = Math.Max(fsrcToFill.du, fsbbox.fsrc.du + fsbbox.fsrc.u);
273fsbbox.fsrc.du = Math.Max(fsrcToFill.du - (mbp.MarginLeft + mbp.MarginRight), 0);
274fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0);
353subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight));
425dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v);
426durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u);
436fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0);
437fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0);
513subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight));
584dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v);
585durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u);
595fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0);
596fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0);
MS\Internal\PtsHost\TextParaClient.cs (9)
738int dcpStart = Math.Max(cpStartTextPointer, cpParagraphStart) - cpParagraphStart;
1407int countVisualsShiftBeforeChange = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual, 0), lineVisuals.Count);
1424int actualLinesToRemove = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual + cLinesToRemove, 0), lineVisuals.Count);
1872int dcpRangeStartForThisLine = Math.Max(lineDesc.dcpFirst, dcpStart);
1875int cchRangeForThisLine = Math.Max(Math.Min(lineDesc.dcpLim, dcpEnd) - dcpRangeStartForThisLine, 1);
1982int dcpRangeStartForThisElem = Math.Max(elemDesc.dcpFirst, dcpStart);
1985int cchRangeForThisElem = Math.Max(Math.Min(elemDesc.dcpLim, dcpEnd) - dcpRangeStartForThisElem, 1);
3126line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, lineDesc.dcpFirst), Math.Min(dcpEnd, lineDesc.dcpLim));
3188line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, element.dcpFirst), Math.Min(dcpEnd, element.dcpLim));
PresentationUI (5)
ReachFramework (5)
Roslyn.Diagnostics.Analyzers (5)
Shared (3)
SignalRSamples (1)
Swaggatherer (1)
System.Collections (1)
System.Collections.Concurrent (1)
System.Collections.Immutable (1)
System.ComponentModel.TypeConverter (2)
System.Console (1)
System.Data.Common (12)
System.Data.Odbc (8)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (2)
System.Drawing.Primitives (4)
System.Formats.Asn1 (1)
System.Formats.Tar (1)
System.IO.Pipelines (3)
System.IO.Ports (2)
System.Linq (3)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (4)
System.Linq.Parallel (1)
System.Memory (2)
System.Net.Http (7)
System.Net.HttpListener (1)
System.Net.Ping (1)
System.Net.Quic (1)
System.Net.Requests (1)
System.Net.Security (1)
System.Net.ServerSentEvents (4)
System.Net.Sockets (5)
System.Net.WebSockets (3)
System.Private.CoreLib (70)
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (25)
598nMaxDigits = Math.Max(number.DigitsCount, TNumber.MaxRoundTripDigits);
1384int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((uint)(-value))) + sNegative.Length;
1410int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((uint)(-value))) + sNegative.Length;
1439int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((uint)value));
1458int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((uint)value));
1495int bufferLength = Math.Max(digits, 32 - (int)uint.LeadingZeroCount(value));
1514int bufferLength = Math.Max(digits, 32 - (int)uint.LeadingZeroCount(value));
1713int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value));
1749int bufferLength = Math.Max(digits, countedDigits);
1817int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((ulong)(-value))) + sNegative.Length;
1843int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits((ulong)(-value))) + sNegative.Length;
1872int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((ulong)value));
1891int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits((ulong)value));
1944int bufferLength = Math.Max(digits, 64 - (int)ulong.LeadingZeroCount(value));
1963int bufferLength = Math.Max(digits, 64 - (int)ulong.LeadingZeroCount(value));
2141int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value));
2176int bufferLength = Math.Max(digits, countedDigits);
2245int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(absValue)) + sNegative.Length;
2273int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(absValue)) + sNegative.Length;
2304int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits(uValue));
2325int bufferLength = Math.Max(digits, FormattingHelpers.CountHexDigits(uValue));
2354return Int64ToHexChars(buffer, lower, hexBase, Math.Max(digits, 1));
2417return UInt64ToBinaryChars(buffer, lower, Math.Max(digits, 1));
2503int bufferLength = Math.Max(digits, FormattingHelpers.CountDigits(value));
2517int bufferLength = Math.Max(digits, countedDigits);
System.Private.CoreLib.Generators (3)
System.Private.DataContractSerialization (13)
System.Private.Uri (2)
System.Private.Windows.Core (1)
System.Private.Xml (4)
System.Reflection.Emit (2)
System.Reflection.Metadata (6)
System.Runtime.Caching (9)
System.Runtime.Numerics (13)
System.Runtime.Serialization.Formatters (1)
System.Security.Cryptography (6)
System.Security.Cryptography.Cose (2)
System.Text.Encodings.Web (4)
System.Text.Json (10)
System.Text.Json.SourceGeneration (4)
System.Text.RegularExpressions (13)
System.Text.RegularExpressions.Generator (8)
System.Threading.RateLimiting (2)
System.Windows.Controls.Ribbon (8)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (7)
362columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount);
374columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount);
381columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / arrangeWidth), childrenCount)), maxColumnCount);
390columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / maxColumnWidth), childrenCount)), maxColumnCount);
397columnCount = Math.Min(Math.Max(minColumnCount, Math.Min((int)(availableSize.Width / _arrangeWidth), childrenCount)), maxColumnCount);
404columnCount = Math.Max(minColumnCount, Math.Min(childrenCount, maxColumnCount));
566finalColumnCount = Math.Max(minColumnCount, Math.Min((int)(finalSize.Width / arrangeWidth), maxColumnCount));
System.Windows.Forms (311)
System.Windows.Forms.Design (95)
System.Windows.Forms.Primitives (7)
System.Windows.Forms.Tests (2)
System.Windows.Forms.UI.IntegrationTests (2)
System.Xaml (1)
Test.Utilities (2)
Text.Analyzers (5)
UIAutomationClientSideProviders (10)
UIAutomationTypes (1)
WindowsFormsIntegration (2)
xunit.assert (9)