104 references to Min
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);
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)
95numBytesToRead = (int)Math.Min(numBytesToRead, _totalLength - _offset);
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
95numBytesToRead = (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)
317cachePolicy.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 (7)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
400var actual = Math.Min(buffer.Length, _inputLength);
Internal\Http\HttpRequestStream.cs (1)
133var actual = (int)Math.Min(length, destination.Length);
Internal\Http2\Http2Connection.cs (1)
1775var copyAmount = (int)Math.Min(outputBuffer.Length, readResult.Buffer.Length);
Internal\Http2\Http2FrameWriter.cs (1)
949return Math.Min(bytes, _connectionWindow);
Internal\Http2\Http2OutputProducer.cs (1)
164return Math.Min(bytes, _streamWindow);
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)
373var 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)
373var 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)
99var actual = Math.Min(readableBuffer.Length, buffer.Length);
Microsoft.Build (1)
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (1)
48int read = stream.Read(buffer, 0, (int)Math.Min(bytesCount - totalRead, buffer.Length));
PresentationCore (5)
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
292int bytesToXor = (int) (Math.Min(ObfuscatedLength, unchecked (readPosition + (long) count)) - readPosition);
MS\Internal\IO\Packaging\NetStream.cs (4)
962bytesAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1026dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1058dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1156block.Length = (int)Math.Min(block.Length, _fullStreamLength - block.Offset);
PresentationFramework (2)
System\Windows\Markup\Baml2006\SharedStream.cs (2)
150long end = Math.Min(_position + 1, _length); 175long end = Math.Min(_position + count, _length);
ReachFramework (1)
PrintConfig\PTProvider.cs (1)
826return (int)Math.Max(0, Math.Min(value, int.MaxValue));
System.Collections.Concurrent (1)
System\Collections\Concurrent\PartitionerStatic.cs (1)
1101long newSharedIndex = Math.Min(SourceCount - 1, oldSharedIndex + requestedChunkSize);
System.Data.Common (1)
System\Data\Common\Int64Storage.cs (1)
111min = Math.Min(_values[record], min);
System.Formats.Tar (8)
System\Formats\Tar\TarHelpers.cs (8)
61byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 64int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToDiscard); 83byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 86int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToDiscard); 97byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy)); 100int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToCopy); 113byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy)); 116int currentLengthToRead = (int)Math.Min(MaxBufferLength, bytesToCopy);
System.IO.Compression (3)
System\IO\Compression\DeflateManaged\InflaterManaged.cs (1)
115bytes = bytes.Slice(0, (int)Math.Min(bytes.Length, _uncompressedSize - _currentInflatedCount));
System\IO\Compression\DeflateZLib\Inflater.cs (1)
101length = (int)Math.Min(length, _uncompressedSize - _currentInflatedCount);
System\IO\Compression\ZipHelper.cs (1)
162int numBytesToSkip = (int)Math.Min(numBytesLeft, buffer.Length);
System.IO.Pipelines (1)
System\IO\Pipelines\PipeReaderStream.cs (1)
126int actual = (int)Math.Min(bufferLength, buffer.Length);
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
332int newSegmentLength = (int)Math.Min(Math.Max(minimumRequired, currentSegmentLength * 2L), Array.MaxLength);
System.Net.Http (11)
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
273long minRtt = Math.Min(prevRtt, currentRtt.Ticks);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
829long readLength = Math.Min(payloadLength, buffer.ActiveLength);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (8)
884int processLength = (int)Math.Min(headersLength, _recvBuffer.ActiveLength); 1084long readLength = Math.Min(payloadLength, _recvBuffer.ActiveLength); 1115int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1135int copyLen = (int)Math.Min(buffer.Length, _responseDataPayloadRemaining); 1187int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1207int copyLen = (int)Math.Min(buffer.Length, _responseDataPayloadRemaining);
System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs (1)
139public int MaxResponseHeadersByteLength => (int)Math.Min(int.MaxValue, _maxResponseHeadersLength * 1024L);
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.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.Net.WebSockets (2)
System\Net\WebSockets\Compression\WebSocketInflater.cs (1)
83_buffer = ArrayPool<byte>.Shared.Rent((int)Math.Min(userBufferLength, payloadLength));
System\Net\WebSockets\ManagedWebSocket.cs (1)
826int limit = (int)Math.Min(header.Compressed ? _inflater!.Span.Length : payloadBuffer.Length, header.PayloadLength);
System.Private.CoreLib (11)
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
67return new DateTime(Math.Min((long)(Math.Floor(numberOfDays) * Calendar.TicksPerDay), DateTime.MaxValue.Ticks)).Year;
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (1)
22int estimatedLength = (int)Math.Min(count * 3L + 4, StackallocThreshold);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
693public 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)
939uint 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)
476_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.Text.RegularExpressions (4)
System\Text\RegularExpressions\RegexNode.cs (2)
2284return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2316return (int)Math.Min(int.MaxValue - 1, sum);
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (2)
2337return (int)Math.Min((long)m + n, int.MaxValue); 2344return (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)
2284return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2316return (int)Math.Min(int.MaxValue - 1, sum);