2037 references to Min
Aspire.Dashboard (5)
Aspire.Hosting (1)
Aspire.Hosting.Docker (1)
BuildActionTelemetryTable (1)
dotnet (3)
dotnet-svcutil-lib (50)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (5)
1167actual = Math.Min(count, value.Length);
1199return ReadBytes(Base64Encoding, 3, 4, buffer, offset, Math.Min(count, 512), false);
1363return ReadBytes(Base64Encoding, 3, 4, buffer, offset, Math.Min(count, 512), true);
1372int actual = Math.Min(_trailByteCount, byteCount);
1442int actual = Math.Min(_trailByteCount, byteCount);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReader.cs (10)
1228int actual = Math.Min(count, _arrayCount);
1260int actual = Math.Min(count, _arrayCount);
1292int actual = Math.Min(count, _arrayCount);
1324int actual = Math.Min(count, _arrayCount);
1356int actual = Math.Min(count, _arrayCount);
1388int actual = Math.Min(count, _arrayCount);
1420int actual = Math.Min(count, _arrayCount);
1447int actual = Math.Min(count, _arrayCount);
1474int actual = Math.Min(count, _arrayCount);
1501int actual = Math.Min(count, _arrayCount);
dotnet-watch (1)
http2cat (8)
IIS.FunctionalTests (8)
IIS.LongTests (8)
IIS.NewHandler.FunctionalTests (8)
IIS.NewShim.FunctionalTests (8)
IIS.ShadowCopy.Tests (2)
IISExpress.FunctionalTests (8)
InMemory.FunctionalTests (1)
Metrics (40)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Metrics.Legacy (40)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.Arcade.Test.Common (2)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Web (4)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.HttpLogging (3)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (4)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (15)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Microsoft.AspNetCore.Shared.Tests (16)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (2)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebSockets.Tests (2)
Microsoft.AspNetCore.WebUtilities (14)
MultipartReaderStream.cs (6)
187var slice = buffer.AsSpan(offset, Math.Min(count, index));
207read = _innerStream.Read(buffer, offset, Math.Min(count, matchOffset - bufferedData.Offset));
218read = _innerStream.Read(buffer, offset, Math.Min(count, bufferedData.Count));
267var slice = buffer[..Math.Min(buffer.Length, index)];
290var slice = buffer[..Math.Min(buffer.Length, matchOffset - bufferedData.Offset)];
304read = _innerStream.Read(buffer.Span[..Math.Min(buffer.Length, bufferedData.Count)]);
Microsoft.Build (30)
SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.Build.Tasks.Core (8)
Microsoft.Build.UnitTests.Shared (2)
Microsoft.Build.Utilities.Core (2)
Microsoft.CodeAnalysis (71)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Text\SourceText.cs (9)
308bufferSize = Math.Min(maxBufferSize, length);
562int count = Math.Min(buffer.Length, end - offset);
640var charsToCopy = Math.Min(CharBufferSize, length - index);
730int position = Math.Max(Math.Min(span.Start, this.Length), 0);
731int length = Math.Min(span.End, this.Length) - position;
740int copyLength = Math.Min(tempBuffer.Length, length);
1038var limit = Math.Min(_lineStarts.Count, lastLineNumber + 4);
1077var contentLength = Math.Min(length - position, buffer.Length);
1220var count = Math.Min(this.Length - position, CharBufferSize);
Microsoft.CodeAnalysis.Analyzers (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.AnalyzerUtilities (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.BannedApiAnalyzers (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.CodeStyle (44)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.Collections.Package (10)
Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.CSharp (29)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
Microsoft.CodeAnalysis.CSharp.Features (9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (9)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (6)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (4)
Microsoft.CodeAnalysis.Extensions.Package (14)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.Features (23)
Microsoft.CodeAnalysis.InteractiveHost (16)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (42)
Microsoft.CodeAnalysis.PublicApiAnalyzers (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.ResxSourceGenerator (43)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.Scripting (5)
Microsoft.CodeAnalysis.Test.Utilities (8)
Microsoft.CodeAnalysis.Threading.Package (10)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (55)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (19)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Microsoft.Data.Analysis (5)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.Build.Tasks.Feed.Tests (2)
Microsoft.DotNet.Cli.Utils (3)
Microsoft.DotNet.HotReload.Client.Package (1)
Microsoft.DotNet.HotReload.Client.Tests (1)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.SignTool (2)
Microsoft.DotNet.VersionTools (1)
Microsoft.Extensions.AI.Evaluation.NLP (4)
Microsoft.Extensions.DependencyInjection (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.DotNetDeltaApplier.Tests (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Interop.SourceGeneration (2)
Microsoft.Maui (1)
Microsoft.Maui.Controls (3)
Microsoft.Maui.Graphics (8)
Microsoft.ML.AutoML (7)
Microsoft.ML.Core (13)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (20)
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 (20)
Training\DcgCalculator.cs (4)
122int maxTrunc = Math.Min(trunc, numDocuments);
379NdcgRangeWorkerChunkFromScores(dataset, labels, scores, result, start, Math.Min(dataset.NumQueries - start, chunkSize), threadIndex);
467Array.Sort(permutation, 0, Math.Min(count, _secondLevelcomparers[threadIndex].CompareFirstN), _secondLevelcomparers[threadIndex]);
518OrderingRangeWorkerFromScores(dataset, scores, result, start, Math.Min(dataset.NumQueries - start, chunkSize), threadIndex);
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (2)
Microsoft.ML.Mkl.Components (1)
Microsoft.ML.PCA (2)
Microsoft.ML.StandardTrainers (7)
Microsoft.ML.Sweeper (6)
Microsoft.ML.Sweeper.Tests (1)
Microsoft.ML.TimeSeries (12)
Microsoft.ML.Tokenizers (7)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (3)
Microsoft.ML.TorchSharp (1)
Microsoft.ML.Transforms (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (2)
Microsoft.NET.Sdk.StaticWebAssets.Tests (2)
Microsoft.TemplateEngine.Cli (3)
Microsoft.VisualBasic.Core (3)
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.Win32.Msi.Manual.Tests (1)
MSBuildTaskHost (1)
PresentationBuildTasks (3)
PresentationCore (59)
System\Windows\Media\FormattedText.cs (13)
324i = Math.Min(limit, i + formatRider.Length);
397i = Math.Min(limit, i + formatRider.Length);
451i = Math.Min(limit, i + formatRider.Length);
503i = Math.Min(limit, i + formatRider.Length);
561i = Math.Min(limit, i + formatRider.Length);
619i = Math.Min(limit, i + formatRider.Length);
669i = Math.Min(limit, i + formatRider.Length);
720i = Math.Min(limit, i + formatRider.Length);
771i = Math.Min(limit, i + formatRider.Length);
821i = Math.Min(limit, i + formatRider.Length);
952return _that._maxTextWidths[Math.Min(line, _that._maxTextWidths.Length - 1)];
1091Math.Min(textSourcePosition + line.Length - 1, _that._text.Length - 1)
1603int x1 = Math.Min(enumerator.Position + enumerator.Length, startIndex + count);
PresentationFramework (129)
MS\Internal\Documents\TextBoxView.cs (12)
646int startOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, startPosition.Offset);
647int endOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, endPosition.Offset);
655lastLineIndex = Math.Min(lastLineIndex, GetLineIndexFromOffset(endOffset, LogicalDirection.Backward));
724int nextLineIndex = Math.Max(0, Math.Min(_lineMetrics.Count - 1, lineIndex + count));
1889int endOffset = Math.Min(range.StartIndex + range.PositionsAdded, _host.TextContainer.SymbolCount);
2001int endOffset = Math.Min(_lineMetrics[lineIndex].EndOffset, unclippedEndOffset);
2097int endOffset = Math.Min(lineEndOffset, unclippedEndOffset);
2159firstLineIndex = Math.Max(0, Math.Min(firstLineIndex, _lineMetrics.Count - 1));
2160lastLineIndex = Math.Max(0, Math.Min(lastLineIndex, _lineMetrics.Count - 1));
2666int lineCount = Math.Min(oldLastLineIndex, firstLineIndex + count - 1) - lineIndex + 1;
2757count = Math.Min(count, _viewportLineVisuals.Count - start);
2933int rangeSize = Math.Min(viewportEnd, selectionEnd) - rangeStart;
MS\Internal\PtsHost\TextParaClient.cs (8)
742int dcpEnd = Math.Min(cpEndTextPointer, cpParagraphEnd) - cpParagraphStart;
1407int countVisualsShiftBeforeChange = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual, 0), lineVisuals.Count);
1424int actualLinesToRemove = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual + cLinesToRemove, 0), lineVisuals.Count);
1452int actualLinesToRemove = Math.Min(cLinesToRemove, lineVisuals.Count - (lineIndexToBeginRemoval - _lineIndexFirstVisual));
1875int cchRangeForThisLine = Math.Max(Math.Min(lineDesc.dcpLim, dcpEnd) - dcpRangeStartForThisLine, 1);
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));
System\Windows\Controls\DataGrid.cs (7)
2623indexToSelect = Math.Min(Items.Count - numSelected - 1, indexToSelect);
5044int previousStartIndex = Math.Min(startIndex, currentCellIndex);
5046int previousStartColumnIndex = Math.Min(startColumnIndex, currentCellColumnIndex);
5087_selectedCells.AddRegion(Math.Min(startIndex, endIndex), Math.Min(startColumnIndex, endColumnIndex), newRowCount, newColumnCount);
5951index = Math.Max(0, Math.Min(numItems - 1, index + (shiftModifier ? -1 : 1)));
6093targetIndex = Math.Max(0, Math.Min(targetIndex, Items.Count - 1));
Publishers.AppHost (1)
ReachFramework (6)
Roslyn.Diagnostics.Analyzers (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.VisualStudio.Next.UnitTests (1)
SignalRSamples (1)
Sockets.FunctionalTests (3)
Stress.ApiService (1)
Swaggatherer (1)
System.Collections (2)
System.Collections.Concurrent (1)
System.Collections.Immutable (2)
System.ComponentModel.TypeConverter (1)
System.Data.Common (20)
System\Data\SQLTypes\SQLDecimal.cs (8)
1268ResPrec = Math.Min(MaxPrecision, ResPrec);
1472ResScale = Math.Min((ResPrec - ResInteger), ResScale);
1474ResScale = Math.Max(ResScale, Math.Min(ActualScale, s_cNumeDivScaleMin));
1698MinScale = Math.Min(ResScale, s_cNumeDivScaleMin);
1700ResInteger = Math.Min(ResInteger, s_NUMERIC_MAX_PRECISION);
1707ResScale = Math.Min((ResPrec - ResInteger), ResScale);
2304bNewPrec = (byte)(Math.Min(s_NUMERIC_MAX_PRECISION, Math.Max(1, lAdjust + _bPrec)));
3175lPosition = Math.Min(s_NUMERIC_MAX_PRECISION, lPosition);
System.Data.Odbc (14)
System\Data\Odbc\OdbcDataReader.cs (8)
571int nValues = Math.Min(values.Length, FieldCount);
972string strdata = buffer.PtrToStringUni(0, Math.Min(lengthOrIndicator, cbMaxData) / 2);
1013cbActual = Math.Min(lengthOrIndicator, cbMaxData);
1185int lengthOfCopy = Math.Min(lengthFromDataIndex, length);
1188lengthOfCopy = Math.Min(lengthOfCopy, buffer.Length - bufferIndex);
1308length = Math.Min(length, buffer.Length - bufferIndex);
1476Buffer.ReadBytes(0, rgBytes, cbOffset, Math.Min(cbActual, cbBufferLen));
1489buffer.ReadBytes(0, rgBytes, cbOffset, Math.Min(cbActual, cbBufferLen));
System.Diagnostics.DiagnosticSource (3)
System.Diagnostics.Process (1)
System.DirectoryServices.Protocols (1)
System.Drawing.Common (3)
System.Drawing.Common.Tests (1)
System.Drawing.Primitives (4)
System.Formats.Asn1 (3)
System.Formats.Nrbf (3)
System.Formats.Tar (2)
System.IO.Compression (3)
System.IO.Pipelines (4)
System.IO.Ports (3)
System.Linq (13)
System.Linq.AsyncEnumerable (3)
System.Linq.Expressions (1)
System.Linq.Parallel (4)
System.Memory (2)
System.Memory.Data (1)
System.Net.Http (24)
System.Net.HttpListener (5)
System.Net.Mail (3)
System.Net.NameResolution (1)
System.Net.Ping (1)
System.Net.Primitives (4)
System.Net.Quic (5)
System.Net.Security (6)
System.Net.Sockets (2)
System.Net.WebClient (1)
System.Net.WebSockets (2)
System.Private.CoreLib (96)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (5)
464FormatDigits(ref result, hour12, Math.Min(tokenLen, 2));
469FormatDigits(ref result, dateTime.Hour, Math.Min(tokenLen, 2));
474FormatDigits(ref result, dateTime.Minute, Math.Min(tokenLen, 2));
479FormatDigits(ref result, dateTime.Second, Math.Min(tokenLen, 2));
638FormatDigits(ref result, year, Math.Min(tokenLen, 2));
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (11)
161capacity = Math.Min(DefaultCapacity, maxCapacity);
209persistedCapacity = Math.Min(Math.Max(DefaultCapacity, persistedString.Length), persistedMaxCapacity);
419int capacityToPreserve = Math.Min(Capacity, Math.Max(Length * 6 / 5, m_ChunkChars.Length));
855int length = Math.Min(m_ChunkChars.Length - m_ChunkLength, count);
919chunkEndIndex = Math.Min(chunkEndIndex, chunk.m_ChunkLength);
2148ReadOnlySpan<char> remainingChunk = chunk.m_ChunkChars.AsSpan(indexInChunk, Math.Min(chunk.m_ChunkLength - indexInChunk, count));
2184Debug.Assert(oldValue.Length > Math.Min(count, chunk.m_ChunkLength - indexInChunk),
2271int endInChunk = Math.Min(chunk.m_ChunkLength, endIndexInChunk);
2549int lengthToCopy = Math.Min(lengthInChunk, count);
2635int newBlockLength = Math.Max(minBlockCharCount, Math.Min(Length, MaxChunkSize));
2747int copyCount1 = Math.Min(count, indexInChunk);
System.Private.DataContractSerialization (36)
System\Xml\XmlBaseReader.cs (6)
1148actual = Math.Min(count, value.Length);
1178return ReadBytes(DataContractSerializer.Base64Encoding, 3, 4, buffer, offset, Math.Min(count, 512), false);
1370return ReadBytes(DataContractSerializer.Base64Encoding, 3, 4, buffer, offset, Math.Min(count, 512), true);
1390return ReadBytes(DataContractSerializer.BinHexEncoding, 1, 2, buffer, offset, Math.Min(count, 512), true);
1425int actual = Math.Min(_trailByteCount, byteCount);
1493int actual = Math.Min(_trailByteCount, byteCount);
System\Xml\XmlBinaryReader.cs (10)
1240int actual = Math.Min(count, _arrayCount);
1263int actual = Math.Min(count, _arrayCount);
1286int actual = Math.Min(count, _arrayCount);
1309int actual = Math.Min(count, _arrayCount);
1332int actual = Math.Min(count, _arrayCount);
1355int actual = Math.Min(count, _arrayCount);
1378int actual = Math.Min(count, _arrayCount);
1402int actual = Math.Min(count, _arrayCount);
1431int actual = Math.Min(count, _arrayCount);
1467int actual = Math.Min(count, _arrayCount);
System.Private.Windows.Core (4)
System.Private.Xml (9)
System.Reflection.Emit (1)
System.Reflection.Metadata (11)
System.Runtime.Caching (5)
System.Runtime.Numerics (6)
System.Runtime.Serialization.Schema (1)
System.Security.Cryptography (9)
System.Security.Cryptography.Pkcs (2)
System.ServiceModel.Http (1)
System.ServiceModel.NetFramingBase (11)
System\ServiceModel\Channels\SingletonConnectionReader.cs (8)
351int bytesToCopy = Math.Min(_chunkBytesRemaining,
352Math.Min(_chunkBufferSize, count));
377bytesToRead = Math.Min(count, _chunkBytesRemaining + IntEncoder.MaxEncodedSize);
383DecodeData(buffer, offset, Math.Min(bytesRead, _chunkBytesRemaining));
455int bytesToCopy = Math.Min(_chunkBytesRemaining,
456Math.Min(_chunkBufferSize, count));
481bytesToRead = Math.Min(count, _chunkBytesRemaining + IntEncoder.MaxEncodedSize);
487DecodeData(buffer, offset, Math.Min(bytesRead, _chunkBytesRemaining));
System.ServiceModel.Primitives (21)
System.ServiceModel.Syndication (1)
System.Text.Json (6)
System.Text.RegularExpressions (17)
System.Text.RegularExpressions.Generator (14)
System.Threading (2)
System.Threading.Channels (1)
System.Threading.Tasks.Dataflow (1)
System.Threading.Tasks.Parallel (1)
System.Windows.Controls.Ribbon (12)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (12)
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 (143)
System.Windows.Forms.Design (37)
System.Windows.Forms.Primitives (7)
System.Windows.Forms.UI.IntegrationTests (2)
Text.Analyzers (42)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
496var currentSegmentLength = Math.Min(remainingInSegment, _length);
505var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed);
600var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
648var currentSegmentLength = Math.Min(Math.Min(remainingInFirstSegment, remainingInSecondSegment), _length - _completed);
738_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
745_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
787_current = segment.AsMemory().Slice(offset, Math.Min(remainingInSegment, _length));
794_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
UIAutomationClientSideProviders (10)
UIAutomationTypes (2)
VBCSCompiler (1)
WindowsFormsIntegration (4)
xunit.assert (2)