61 references to Min
mscorlib (2)
system\collections\concurrent\PartitionerStatic.cs (1)
1152long newSharedIndex = Math.Min(SourceCount - 1, oldSharedIndex + requestedChunkSize);
system\globalization\CalendricalCalculationsHelper.cs (1)
77return new DateTime(Math.Min((long)(Math.Floor(numberOfDays) * GregorianCalendar.TicksPerDay), DateTime.MaxValue.Ticks)).Year;
PresentationCore (5)
Core\CSharp\MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
298int bytesToXor = (int) (Math.Min(ObfuscatedLength, unchecked (readPosition + (long) count)) - readPosition);
Core\CSharp\MS\Internal\IO\Packaging\NetStream.cs (4)
1017bytesAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1081dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1120dataAvailable = (int)Math.Min(block.Length, _highWaterMark - block.Offset); 1218block.Length = (int)Math.Min(block.Length, _fullStreamLength - block.Offset);
PresentationFramework (2)
src\Framework\System\Windows\Markup\Baml2006\SharedStream.cs (2)
158long end = Math.Min(_position + 1, _length); 192long end = Math.Min(_position + count, _length);
System (7)
net\System\Net\_ConnectStream.cs (2)
1510bytesToRead = (int)Math.Min(m_ReadBytes, (long)size); 1747bytesToRead = (int)Math.Min(m_ReadBytes, (long)size);
net\System\Net\Sockets\_AcceptOverlappedAsyncResult.cs (1)
143Logging.Dump(Logging.Sockets, m_ListenSocket, "PostCompletion", pinnedBuffer, (int)Math.Min(size, (long)m_Buffer.Length));
net\System\Net\webclient.cs (4)
644buffSize = (int)Math.Min((long)DefaultCopyBufferLength, fs.Length); 657buffSize = (int) Math.Min((long) DefaultCopyBufferLength, fs.Length); 2313chunkSize = (int)Math.Min((long)DefaultCopyBufferLength, data.Length); 2512chunkSize = (int)Math.Min((long)DefaultCopyBufferLength, buffer.Length);
System.Activities.DurableInstancing (1)
System\Activities\DurableInstancing\SqlCommandAsyncResult.cs (1)
64long openTimeout = Math.Min(timeout.Ticks, SqlCommandAsyncResult.MaximumOpenTimeout.Ticks);
System.Data (14)
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (3)
2792return Math.Min(first, second); 2854length = (int) Math.Min((long)length, actualLength - fieldOffset); 2858length = (int) Math.Min((long)length, maxLength - fieldOffset);
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
2459lval = Math.Min((long)Int32.MaxValue, lval);
fx\src\data\System\Data\Common\Int64Storage.cs (1)
101min=Math.Min(values[record], min);
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (3)
1192cbReadMax = (int)Math.Min(cbLength, internalNativeBuffer.Length - 4); 1200cbReadMax = (int)Math.Min(cbLength, internalNativeBuffer.Length - 2); 2005row[columnSize] = unchecked((int)Math.Min(Math.Max(Int32.MinValue, metadata[i].size.ToInt64()), Int32.MaxValue));
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
1833int bytesToRead = (int)Math.Min((long)length, _sharedState._columnDataBytesRemaining);
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (1)
30_readTimeout = (int)Math.Min((long)reader.Command.CommandTimeout * 1000L, (long)Int32.MaxValue);
fx\src\data\System\Data\SqlClient\SqlSequentialStreamSmi.cs (1)
70int bytesNeeded = (int)Math.Min((long)count, _length - _position);
fx\src\data\System\Data\SqlClient\SqlSequentialTextReaderSmi.cs (1)
94int charsNeeded = (int)Math.Min((long)(count - charsRead), _length - _position);
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (2)
435remaining = (int)Math.Min((long)Int32.MaxValue, _timeoutMilliseconds); 1844cbSkip = (int)Math.Min((long)Int32.MaxValue, num);
System.Runtime.Caching (2)
System\Caching\CacheMemoryMonitor.cs (2)
102memoryLimit = Math.Min(usableMemory, recommendedPrivateByteLimit); 222_memoryLimit = Math.Min(_memoryLimit, cacheMemoryLimit);
System.ServiceModel (7)
System\ServiceModel\Channels\BufferedConnection.cs (1)
96int flushSkew = Ticks.ToMilliseconds(Math.Min(this.flushTimeout / 10, Ticks.FromMilliseconds(maxFlushSkew)));
System\ServiceModel\Channels\MessageEncoderCompressionHandler.cs (1)
19int maxDecompressedSize = (int)Math.Min(maxReceivedMessageSize, int.MaxValue);
System\ServiceModel\Channels\PeerNodeImplementation.cs (1)
398factoryMaxReceivedMessageSize = (int)Math.Min(maxReceivedMessageSize, settings.MaxReceivedMessageSize);
System\ServiceModel\Channels\SocketConnection.cs (1)
1512long delta = Math.Max(oldTimeout.Ticks, newTimeout.Ticks) - Math.Min(oldTimeout.Ticks, newTimeout.Ticks);
System\ServiceModel\Channels\TransmissionStrategy.cs (3)
103this.meanRtt = Math.Min((long)initRtt.TotalMilliseconds, Constants.MaxMeanRtt >> Constants.TimeMultiplier) << Constants.TimeMultiplier; 840this.serrRtt = Math.Min(this.serrRtt + ((Math.Abs(error) - this.serrRtt) >> Constants.Gain), Constants.MaxSerrRtt); 841this.meanRtt = Math.Min(this.meanRtt + (error >> Constants.Gain), Constants.MaxMeanRtt);
System.ServiceModel.Channels (2)
System\ServiceModel\Channels\UdpChannelFactory.cs (1)
45int maxBufferSize = (int)Math.Min(transportBindingElement.MaxReceivedMessageSize, UdpConstants.MaxMessageSizeOverIPv4);
System\ServiceModel\Channels\UdpChannelListener.cs (1)
64int maxBufferSize = (int)Math.Min(udpTransportBindingElement.MaxReceivedMessageSize, UdpConstants.MaxMessageSizeOverIPv4);
System.Web (3)
Management\AppDomainResourcePerfCounters.cs (1)
112_MemUsageLastReported = (int) Math.Min(Int32.MaxValue, Math.Max(0, memInKB)); // Make sure its within 0 and Int32.MaxValue
Management\webeventbuffer.cs (1)
174_burstWaitTimeMs = Math.Min(_burstWaitTimeMs, _urgentFlushIntervalMs);
Security\AntiXss\EncoderUtil.cs (1)
38charsToAllocate = (int)Math.Min(upperBound, worstCaseTotalChars);
System.Windows.Forms (1)
winforms\Managed\System\WinForms\TextBoxBase.cs (1)
1929long longLength = Math.Min(0, (long)length + start - textLen);
WindowsBase (15)
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (1)
229sourceBufferSize = (int)(Math.Min(source.Length, (long)_defaultBlockSize));
Base\MS\Internal\IO\Packaging\CompressStream.cs (2)
640byte[] buf = new byte[Math.Min(0x1000, bytesToSeek)]; 646long n = Math.Min(bytesToSeek, buf.Length);
Base\MS\Internal\IO\Packaging\SparseMemoryStream.cs (3)
204int bytesToRead = (int) Math.Min((long)count, _currentStreamLength - _currentStreamPosition); 783byte[] zeroBytesBuf = new byte[Math.Min(0x80000, toSkip)]; // 512K chunks max 786int bytes = (int)Math.Min(toSkip, zeroBytesBuf.Length);
Base\MS\Internal\IO\Zip\ZipIOBlockManager.cs (2)
365byte[] tempBuffer = new byte [Math.Min(moveBlockSize,0x100000)]; // min(1mb, requested block size) 371int subBlockSize = (int)Math.Min((long)tempBuffer.Length, moveBlockSize - bytesMoved);
Base\MS\Internal\IO\Zip\ZipIOFileItemStream.cs (5)
213persistedTailSize = Math.Min(_currentStreamLength, _persistedSize) - newStreamPosition; 217diskBytesToRead = (int)Math.Min((long)count, persistedTailSize); // this is a safe cast as count has int type 298diskBytesToWrite = (int) (Math.Min(count, _persistedSize - newStreamPosition)); // this is a safe cast as count has int type 369Math.Min(_persistedSize, _currentStreamLength), // in case the stream is smaller then our persisted block on 456long moveBlockSize = Math.Min(_persistedSize, _currentStreamLength);
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (2)
313int bytesRead = sourceStream.Read(buffer, 0, (int)Math.Min(bytesLeftToCopy, (long)bufferSize)); 396overlapBlockSize = Math.Min(block1Offset + block1Size, block2Offset + block2Size) - overlapBlockOffset;