143 references to Min
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (1)
878long delta = Math.Max(oldTimeout.Ticks, newTimeout.Ticks) - Math.Min(oldTimeout.Ticks, newTimeout.Ticks);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoderCompressionHandler.cs (1)
20int maxDecompressedSize = (int)Math.Min(maxReceivedMessageSize, int.MaxValue);
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
http2cat (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IIS.LongTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
Metrics (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.AspNetCore.Components.Server (2)
Circuits\RemoteJSDataStream.cs (1)
49(int)Math.Min(signalRMaximumIncomingBytes, 50 * 1024) - 512 :
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
36var lengthPrefixBuffer = buffer.Slice(0, Math.Min(MaxLengthPrefixSize, buffer.Length));
Microsoft.AspNetCore.Components.Web (1)
Forms\InputFile\BrowserFileStream.cs (1)
73var maxBytesToRead = (int)Math.Min(bytesAvailableToRead, buffer.Length);
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
99numBytesToRead = (int)Math.Min(numBytesToRead, _totalLength - _offset);
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
99numBytesToRead = (int)Math.Min(numBytesToRead, _totalLength - _offset);
Microsoft.AspNetCore.Http (3)
Internal\ReferenceReadStream.cs (2)
95var toRead = Math.Min(count, _length - _position); 108var toRead = (int)Math.Min(buffer.Length, _length - _position);
src\Http\Shared\StreamCopyOperationInternal.cs (1)
57readLength = (int)Math.Min(bytesRemaining.GetValueOrDefault(), (long)readLength);
Microsoft.AspNetCore.Http.Extensions (1)
src\Http\Shared\StreamCopyOperationInternal.cs (1)
57readLength = (int)Math.Min(bytesRemaining.GetValueOrDefault(), (long)readLength);
Microsoft.AspNetCore.Http.Results (2)
src\Http\Shared\StreamCopyOperationInternal.cs (1)
57readLength = (int)Math.Min(bytesRemaining.GetValueOrDefault(), (long)readLength);
src\Shared\RangeHelper\RangeHelper.cs (1)
121var bytes = Math.Min(end.Value, length);
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
121var bytes = Math.Min(end.Value, length);
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\Response.cs (1)
315cachePolicy.SecondsToLive = (uint)Math.Min(_cacheTtl.Value.Ticks / TimeSpan.TicksPerSecond, Int32.MaxValue);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.IO.cs (1)
36var actual = Math.Min(readableBuffer.Length, memory.Length);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
Microsoft.AspNetCore.Server.Kestrel.Core (8)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
402var actual = Math.Min(buffer.Length, _inputLength);
Internal\Http\HttpRequestStream.cs (1)
133var actual = (int)Math.Min(length, destination.Length);
Internal\Http2\Http2Connection.cs (1)
1867var copyAmount = (int)Math.Min(outputBuffer.Length, readResult.Buffer.Length);
Internal\Http2\Http2FrameWriter.cs (1)
1057return Math.Min(bytes, _connectionWindow);
Internal\Http2\Http2OutputProducer.cs (1)
171return Math.Min(bytes, _streamWindow);
Internal\Http3\Http3FrameReader.cs (1)
51length = Math.Min(startOfFramePayload.Length, length);
Internal\Infrastructure\TimeoutControl.cs (1)
114_readTimingElapsedTicks += Math.Min(timestamp - _lastTimestamp, _heartbeatIntervalTicks);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
135var count = (int)Math.Min(readableBuffer.Length, destination.Length);
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
374var numElements = (int)Math.Min(BufferLength, Math.Max(1, sequenceId - (linkedBuffer._startingSequenceId - 1)));
Microsoft.AspNetCore.SignalR.Common.Tests (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
36var lengthPrefixBuffer = buffer.Slice(0, Math.Min(MaxLengthPrefixSize, buffer.Length));
Microsoft.AspNetCore.SignalR.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
374var numElements = (int)Math.Min(BufferLength, Math.Max(1, sequenceId - (linkedBuffer._startingSequenceId - 1)));
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
36var lengthPrefixBuffer = buffer.Slice(0, Math.Min(MaxLengthPrefixSize, buffer.Length));
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
36var lengthPrefixBuffer = buffer.Slice(0, Math.Min(MaxLengthPrefixSize, buffer.Length));
Microsoft.AspNetCore.StaticAssets (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
121var bytes = Math.Min(end.Value, length);
Microsoft.AspNetCore.StaticFiles (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
121var bytes = Math.Min(end.Value, length);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
121var bytes = Math.Min(end.Value, length);
Microsoft.AspNetCore.TestHost (1)
ResponseBodyReaderStream.cs (1)
102var actual = Math.Min(readableBuffer.Length, buffer.Length);
Microsoft.CodeAnalysis (1)
MetadataReference\ModuleMetadata.cs (1)
238(int)Math.Min(unmanagedMemoryStream.Length, int.MaxValue),
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonObjectFormatter.Builder.cs (1)
55_currentLimit = (int)Math.Min((long)_sb.Length + _options.MaximumLineLength, _options.MaximumOutputLength);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Microsoft.Data.Analysis (17)
DataFrame.Arrow.cs (1)
189int numberOfRowsInThisRecordBatch = (int)Math.Min(recordBatchLength, Rows.Count);
DataFrame.cs (2)
343int shuffleUpperLimit = (int)Math.Min(Int32.MaxValue, Rows.Count); 721long numberOfRows = Math.Min(Rows.Count, rowsToShow);
DataFrame.Join.cs (3)
57long minLength = Math.Min(Rows.Count, other.Rows.Count); 80long minLength = Math.Min(Rows.Count, other.Rows.Count); 125long newRowCount = Math.Min(Rows.Count, other.Rows.Count);
DataFrameBuffer.cs (1)
83var doubledSize = (int)Math.Min((long)ReadOnlyBuffer.Length * 2, ArrayUtility.ArrayMaxSize);
DataFrameColumn.cs (1)
440var numberOfRows = Math.Min(Length, rowsToShow);
DataFrameColumns\StringDataFrameColumn.cs (1)
31List<string> buffer = new List<string>((int)Math.Min(MaxCapacity, bufferLen));
DataFrameColumns\VBufferDataFrameColumn.cs (1)
34int bufferLen = (int)Math.Min(MaxCapacity, length - _vBuffers.Count * MaxCapacity);
PrimitiveColumnContainer.cs (2)
160int allocatable = (int)Math.Min(remaining, ReadOnlyDataFrameBuffer<T>.MaxCapacity - originalBufferLength); 373long endIndex = Math.Min(Length, startIndex + length);
PrimitiveDataFrameColumn.cs (1)
215long endIndex = Math.Min(Length, startIndex + length);
PrimitiveDataFrameColumnComputations.cs (4)
3272ret = (long)(Math.Min(readOnlySpan[i], ret)); 3316ret = (long)Math.Min(span[(int)row], ret); 3512value = (long)(Math.Min(readOnlySpan[i], value)); 3539value = (long)(Math.Min(readOnlySpan[(int)row], value));
Microsoft.Data.Analysis.Interactive (1)
DataFrameKernelExtension.cs (1)
56var rowCount = Math.Min(maxRowCount, df.Rows.Count);
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
161int newSize = Math.Max(desiredSize, (int)Math.Min(ArrayMaxLength, 2 * (uint)_bytes.Length));
Microsoft.Extensions.ServiceDiscovery.Dns (1)
Resolver\DnsResolver.cs (1)
627expiration = createdAt.AddSeconds(Math.Min(minimum, soa.Value.Ttl));
Microsoft.ML.Core (1)
Utilities\Stream.cs (1)
48(read = source.Read(buffer, 0, (int)Math.Min(buffer.Length, remaining))) != 0)
Microsoft.ML.Data (1)
Transforms\SkipTakeFilter.cs (1)
202return Math.Min(Math.Max(0, afterSkip), _take);
Microsoft.ML.FastTree (3)
Dataset\IntArray.cs (3)
342long bestCost = Math.Min(Math.Min(Math.Min(denseBits, sparseBits), rleBits), segBits);
Microsoft.ML.Transforms (1)
Expression\BuiltinFunctions.cs (1)
282FunctionProviderUtils.Fn<I8, I8, I8>(Math.Min),
PresentationCore (5)
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
289int bytesToXor = (int) (Math.Min(ObfuscatedLength, unchecked (readPosition + (long) count)) - readPosition);
MS\Internal\IO\Packaging\NetStream.cs (4)
951bytesAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1015dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1047dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1145block.Length = (int)Math.Min(block.Length, _fullStreamLength - block.Offset);
PresentationFramework (2)
System\Windows\Markup\Baml2006\SharedStream.cs (2)
148long end = Math.Min(_position + 1, _length); 173long end = Math.Min(_position + count, _length);
ReachFramework (1)
PrintConfig\PTProvider.cs (1)
816return (int)Math.Max(0, Math.Min(value, int.MaxValue));
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
1037var numberOfBytesInThisRead = (int)Math.Min(count, _length - _position);
System.Collections.Concurrent (1)
System\Collections\Concurrent\PartitionerStatic.cs (1)
1101long newSharedIndex = Math.Min(SourceCount - 1, oldSharedIndex + requestedChunkSize);
System.Collections.Immutable (1)
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (1)
71long maxAllowedLength = Math.Min((long)count * LengthToCountFactor, Array.MaxLength);
System.Data.Common (1)
System\Data\Common\Int64Storage.cs (1)
111min = Math.Min(_values[record], min);
System.Data.Odbc (3)
System\Data\Odbc\OdbcDataReader.cs (3)
1370cbReadMax = (int)Math.Min(cbLength, internalNativeBuffer.Length - 4); 1379cbReadMax = (int)Math.Min(cbLength, internalNativeBuffer.Length - 2); 2277row[columnSize] = unchecked((int)Math.Min(Math.Max(int.MinValue, _metadata![i].size.ToInt64()), int.MaxValue));
System.Formats.Tar (8)
System\Formats\Tar\TarHelpers.cs (8)
60byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 63int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToDiscard); 82byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 85int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToDiscard); 96byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy)); 99int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToCopy); 112byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy)); 115int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToCopy);
System.IO.Pipelines (1)
System\IO\Pipelines\PipeReaderStream.cs (1)
126int actual = (int)Math.Min(bufferLength, buffer.Length);
System.Linq (2)
System\Linq\SegmentedArrayBuilder.cs (1)
354int newSegmentLength = (int)Math.Min(Math.Max(minimumRequired, currentSegmentLength * 2L), Array.MaxLength);
System\Linq\Shuffle.SpeedOpt.cs (1)
187if (sample is not null && index < Math.Min(_takeCount, totalElementCount))
System.Net.HttpListener (4)
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
263length = (int)Math.Min(_contentLength, (long)length);
System\Net\Managed\HttpRequestStream.Managed.cs (3)
78size = (int)Math.Min(size, _remainingBody); 110size = (int)Math.Min(_remainingBody, (long)size); 158size = (int)Math.Min(_remainingBody, (long)size);
System.Net.ServerSentEvents (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
161int newSize = Math.Max(desiredSize, (int)Math.Min(ArrayMaxLength, 2 * (uint)_bytes.Length));
System.Net.WebClient (5)
src\libraries\Common\src\System\IO\ChunkedMemoryStream.cs (1)
90nextChunkLength = (int)Math.Min(count, MaxChunkSize);
System\Net\WebClient.cs (4)
527buffSize = (int)Math.Min(DefaultCopyBufferLength, fs.Length); 540buffSize = (int)Math.Min(DefaultCopyBufferLength, fs.Length); 1435chunkSize = (int)Math.Min((long)DefaultCopyBufferLength, data.Length); 1511chunkSize = (int)Math.Min((long)DefaultCopyBufferLength, buffer.Length);
System.Private.CoreLib (11)
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
66return new DateTime(Math.Min((long)(Math.Floor(numberOfDays) * TimeSpan.TicksPerDay), DateTime.MaxValue.Ticks)).Year;
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (1)
22int estimatedLength = (int)Math.Min(checked(count * 3L + 4), StackallocThreshold);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
689public static long Min(long x, long y) => Math.Min(x, y);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
148bufferSize = (int)Math.Min(bufferSize, remaining);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (1)
371long n = Math.Min(len - pos, buffer.Length);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (1)
943uint minElementsRemaining = (uint)Math.Min(inputCharsRemaining, outputBytesRemaining);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (1)
221newNumThreadsGoal = (short)Math.Min(newNumThreadsGoal, achievableNumThreadsGoal);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (1)
478_memoryUsageBytes = Math.Min(gcMemoryInfo.MemoryLoadBytes, gcMemoryInfo.HighMemoryLoadThresholdBytes);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (2)
200int sampleCount = ((int)Math.Min(_totalSamples - 1, _samplesToMeasure)) / _wavePeriod * _wavePeriod; 413entry.lastHistoryCount = (int)(Math.Min(_totalSamples, _samplesToMeasure) / _wavePeriod) * _wavePeriod;
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
333return (int)Math.Min(ushort.MaxValue, m_maxDepth + m_depthAdjustment);
System.Runtime.Caching (1)
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
119memoryLimit = Math.Min(usableMemory, recommendedPrivateByteLimit);
System.ServiceModel.Federation (1)
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (1)
356DateTime effectiveExpiration = AddTicks(fromTime, Math.Min(effectiveInterval, WSTrustTokenParameters.MaxIssuedTokenCachingTime.Ticks));
System.Text.Json (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
161int newSize = Math.Max(desiredSize, (int)Math.Min(ArrayMaxLength, 2 * (uint)_bytes.Length));
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\RegexNode.cs (2)
2291return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2323return (int)Math.Min(int.MaxValue - 1, sum);
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (2)
2333return (int)Math.Min((long)m + n, int.MaxValue); 2340return (int)Math.Min((long)m * n, int.MaxValue);
System.Text.RegularExpressions.Generator (2)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (2)
2291return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2323return (int)Math.Min(int.MaxValue - 1, sum);
System.Windows.Forms (1)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1724long longLength = Math.Min(0, (long)length + start - textLen);
Test.Utilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
45var count = (int)Math.Min(ChunkSize, length - i);