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