164 references to MaxValue
aspire (1)
Commands\AppHostStartupTimeout.cs (1)
44&& seconds <= TimeSpan.MaxValue.TotalSeconds)
Aspire.Dashboard.Tests (1)
DashboardUIHelpersTests.cs (1)
82var duration = TimeSpan.MaxValue;
Aspire.Hosting.Radius.Tests (1)
Secrets\AddRadiusSecretStoreTests.cs (1)
349Assert.Throws<ArgumentOutOfRangeException>(() => store.WithMaterializationTimeout(TimeSpan.MaxValue));
Aspire.StackExchange.Redis.Tests (2)
AspireRedisExtensionsTests.cs (2)
379await outputCache.SetAsync("outputKey", [1, 2, 3, 4], tags: null, validFor: TimeSpan.MaxValue, cancellationToken: default); 433await outputCache.SetAsync("outputKey", [1, 2, 3, 4], tags: null, validFor: TimeSpan.MaxValue, cancellationToken: default);
Binding.Tcp.IntegrationTests (2)
NetTcpBindingTests.4.0.0.cs (2)
175SendTimeout = TimeSpan.MaxValue, 176ReceiveTimeout = TimeSpan.MaxValue
dotnet-svcutil-lib (41)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InputQueue.cs (2)
812if (timeout != TimeSpan.MaxValue) 869if (timeout != TimeSpan.MaxValue)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
160if (timeout == TimeSpan.MaxValue || timeout == Timeout.InfiniteTimeSpan)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (8)
31_deadlineSet = (timeout == TimeSpan.MaxValue); 70return (timeout > TimeoutHelper.MaxWait) && (timeout != TimeSpan.MaxValue); 77return TimeSpan.MaxValue; 87if (timeout == TimeSpan.MaxValue) 139if (timeout == TimeSpan.MaxValue) 141return TimeSpan.MaxValue; 156return TimeSpan.MaxValue; 213if (timeout == TimeSpan.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (8)
51_sendTimeout = _receiveTimeout = TimeSpan.MaxValue; 351ConvertSendException(socketException, TimeSpan.MaxValue)); 403ConvertSendException(socketException, TimeSpan.MaxValue)); 464_asyncWriteException = ConvertSendException(socketException, TimeSpan.MaxValue); 664throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(ConvertReceiveException(socketException, TimeSpan.MaxValue)); 704_asyncReadException = ConvertReceiveException(socketException, TimeSpan.MaxValue); 822if (timeout == TimeSpan.MaxValue) 859if (timeout == TimeSpan.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (2)
46if (_idleTimeout != TimeSpan.MaxValue || _leaseTimeout != TimeSpan.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (5)
465manager.CallOnce(TimeSpan.MaxValue, null); 475return manager.BeginCallOnce(TimeSpan.MaxValue, null, callback, state); 1934if (timeout != TimeSpan.MaxValue) 2276if (timeout != TimeSpan.MaxValue) 2352if (binder.HasSession && (idle != TimeSpan.MaxValue))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (4)
53_sendTimeout = _receiveTimeout = TimeSpan.MaxValue; 185TransferOperation.Undefined, false, null, TransferOperation.Undefined, null, TimeSpan.MaxValue); 450if (timeSpent == TimeSpan.MaxValue) 471if (timeSpent == TimeSpan.MaxValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
614WebSocketHelper.ThrowCorrectException(ex, TimeSpan.MaxValue, WebSocketHelper.ReceiveOperation); 644_pendingException = WebSocketHelper.ConvertAndTraceException(ex, TimeSpan.MaxValue, WebSocketHelper.ReceiveOperation);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (1)
193if (binder._channelBinder.TryReceive(TimeSpan.MaxValue, out requestContext))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelHandler.cs (3)
108Fx.Assert((_idleManager != null) == (_binder.HasSession && _listener.ChannelDispatcher.DefaultCommunicationTimeouts.ReceiveTimeout != TimeSpan.MaxValue), "idle manager is present only when there is a session with a finite receive timeout"); 242return _receiver.BeginTryReceive(TimeSpan.MaxValue, ChannelHandler.s_onAsyncReceiveComplete, this); 1119while (!TryReceive(TimeSpan.MaxValue, out request))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (2)
822if (timeout != TimeSpan.MaxValue) 1159result = _innerChannel.BeginReceive(TimeSpan.MaxValue, s_receiveAsyncCallback, this);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
1021if (this.MaxClockSkew == TimeSpan.MaxValue || this.ReplayWindow == TimeSpan.MaxValue)
Metadata\MetadaExchangeResolver.cs (1)
78resolver.OperationTimeout = TimeSpan.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Core (14)
DirectTlsEndpointOptions.cs (1)
134field = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
Http2Limits.cs (6)
21private TimeSpan _keepAlivePingDelay = TimeSpan.MaxValue; 154/// Delay value must be greater than or equal to 1 second. Set to <see cref="TimeSpan.MaxValue"/> to 156/// Defaults to <see cref="TimeSpan.MaxValue"/>. 170_keepAlivePingDelay = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue; 179/// Timeout must be greater than or equal to 1 second. Set to <see cref="TimeSpan.MaxValue"/> to 195_keepAlivePingTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
HttpsConnectionAdapterOptions.cs (1)
126_handshakeTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
Internal\Http2\Http2Connection.cs (1)
178if (http2Limits.KeepAlivePingDelay != TimeSpan.MaxValue)
Internal\Http2\Http2KeepAlive.cs (1)
38_keepAliveTimeout = keepAliveTimeout == TimeSpan.MaxValue ? long.MaxValue
Internal\Infrastructure\TimeExtensions.cs (1)
17if (timeSpan == TimeSpan.MaxValue)
KestrelServerLimits.cs (2)
185_keepAliveTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue; 204_requestHeadersTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
TlsHandshakeCallbackOptions.cs (1)
39_handshakeTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
TlsEventPump.cs (1)
148_handshakeTimeoutMs = handshakeTimeout == Timeout.InfiniteTimeSpan || handshakeTimeout == TimeSpan.MaxValue
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\AbstractBrowserRefreshServer.cs (1)
170await Task.Delay(SuppressTimeouts ? TimeSpan.MaxValue : reportDelayInSeconds, progressCancellationSource.Token);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\KestrelWebSocketServer.cs (1)
105.WaitAsync(suppressTimeouts ? TimeSpan.MaxValue : TimeSpan.FromSeconds(10), cancellationToken);
Microsoft.Extensions.AI.Abstractions.Tests (1)
parent\parent\Shared\JsonSchemaExporter\TestTypes.cs (1)
91AdditionalValues: [TimeSpan.MinValue, TimeSpan.MaxValue],
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.StampedeStateT.cs (1)
524private void SetResult(CacheItem<T> value) => SetResult(value, TimeSpan.MaxValue);
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Client\DiscoveryCriteria.cs (1)
47TimeSpan.MaxValue,
Client\TestRunCriteria.cs (3)
82TimeSpan.MaxValue) 364TimeSpan.MaxValue) 732TimeSpan.MaxValue)
NuGet.Configuration (1)
PackageSource\PackageSourceProvider.cs (1)
416hours <= TimeSpan.MaxValue.TotalHours)
Shared (2)
ServerSentEvents\SseParser_1.cs (2)
47private readonly long TimeSpan_MaxValueMilliseconds = (long)TimeSpan.MaxValue.TotalMilliseconds; 451TimeSpan timeSpan = milliseconds == TimeSpan_MaxValueMilliseconds ? TimeSpan.MaxValue : TimeSpan.FromMilliseconds(milliseconds);
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
91AdditionalValues: [TimeSpan.MinValue, TimeSpan.MaxValue],
System.Configuration.ConfigurationManager (7)
System\Configuration\InfiniteTimeSpanConverter.cs (2)
17return (TimeSpan)value == TimeSpan.MaxValue 25? TimeSpan.MaxValue
System\Configuration\TimeSpanMinutesOrInfiniteConverter.cs (2)
15return (TimeSpan)value == TimeSpan.MaxValue ? "Infinite" : base.ConvertTo(ctx, ci, value, type); 20return (string)data == "Infinite" ? TimeSpan.MaxValue : base.ConvertFrom(ctx, ci, data);
System\Configuration\TimeSpanSecondsOrInfiniteConverter.cs (2)
15return (TimeSpan)value == TimeSpan.MaxValue ? "Infinite" : base.ConvertTo(ctx, ci, value, type); 20return (string)data == "Infinite" ? TimeSpan.MaxValue : base.ConvertFrom(ctx, ci, data);
System\Configuration\TimeSpanValidatorAttribute.cs (1)
19public TimeSpan MaxValue { get; private set; } = TimeSpan.MaxValue;
System.Data.Common (1)
System\Data\Common\TimeSpanStorage.cs (1)
29TimeSpan min = TimeSpan.MaxValue;
System.Diagnostics.EventLog (2)
System\Diagnostics\Reader\EventLogReader.cs (2)
130if (ts != TimeSpan.MaxValue) 154return ReadEvent(TimeSpan.MaxValue);
System.Management (2)
System\Management\ManagementDateTime.cs (1)
296/// <see cref='System.TimeSpan.MaxValue'/> then <see cref='System.ArgumentOutOfRangeException'/> is thrown.
System\Management\ManagementOptions.cs (1)
125public static readonly TimeSpan InfiniteTimeout = TimeSpan.MaxValue;
System.Net.Requests (3)
System\Net\Cache\HttpRequestCachePolicy.cs (2)
11private readonly TimeSpan _maxAge = TimeSpan.MaxValue; 96(_maxAge == TimeSpan.MaxValue ? string.Empty : " MaxAge:" + _maxAge.ToString()) +
System\Net\HttpWebRequest.cs (1)
1355if (httpRequestCachePolicy.MaxAge != TimeSpan.MaxValue)
System.Net.Security (1)
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
320ret = await System.Net.Http.X509ResourceClient.DownloadAssetAsync(url, TimeSpan.MaxValue).ConfigureAwait(false);
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseParser_1.cs (2)
33private readonly long TimeSpan_MaxValueMilliseconds = (long)TimeSpan.MaxValue.TotalMilliseconds; 456TimeSpan timeSpan = milliseconds == TimeSpan_MaxValueMilliseconds ? TimeSpan.MaxValue : TimeSpan.FromMilliseconds(milliseconds);
System.Private.CoreLib (15)
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (15)
268/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 290/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 453/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 469/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 490/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 505/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 525/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 539/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 558/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 571/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 589/// The parameter specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 602/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 630/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 653return MaxValue; 666/// <paramref name="value"/> is less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/>.
System.ServiceModel.Federation (4)
System\Runtime\TimeoutHelper.cs (3)
23_deadlineSet = (timeout == TimeSpan.MaxValue); 30return (timeout > MaxWait) && (timeout != TimeSpan.MaxValue); 116return TimeSpan.MaxValue;
System\ServiceModel\Federation\WsTrustTokenParameters.cs (1)
37public static readonly TimeSpan DefaultMaxIssuedTokenCachingTime = TimeSpan.MaxValue;
System.ServiceModel.Http (2)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
586WebSocketHelper.ThrowCorrectException(ex, TimeSpan.MaxValue, WebSocketHelper.ReceiveOperation); 616_pendingException = WebSocketHelper.ConvertAndTraceException(ex, TimeSpan.MaxValue, WebSocketHelper.ReceiveOperation);
System.ServiceModel.NetFramingBase (3)
System\ServiceModel\Channels\ConnectionPoolRegistry.cs (1)
63TimeSpan leaseTimeout = TimeSpan.MaxValue;
System\ServiceModel\Channels\IdlingCommunicationPool.cs (2)
35if (IdleTimeout != TimeSpan.MaxValue || _leaseTimeout != TimeSpan.MaxValue)
System.ServiceModel.NetNamedPipe (1)
System\Runtime\BackoffTimeoutHelper.cs (1)
41if (timeout == TimeSpan.MaxValue)
System.ServiceModel.NetTcp (5)
System\ServiceModel\Channels\SocketConnection.cs (5)
413ConvertSendException(socketException, TimeSpan.MaxValue, _asyncSendTimeout)); 538if (timeout == TimeSpan.MaxValue) 589if (timeout == TimeSpan.MaxValue) 840if (timeSpent == TimeSpan.MaxValue) 861if (timeSpent == TimeSpan.MaxValue)
System.ServiceModel.Primitives (32)
Internals\System\Runtime\InputQueue.cs (2)
908if (timeout != TimeSpan.MaxValue) 959if (timeout != TimeSpan.MaxValue)
Internals\System\Runtime\IOThreadTimer.cs (1)
72if (timeFromNow != TimeSpan.MaxValue)
Internals\System\Runtime\TaskHelpers.cs (1)
226if (timeout == TimeSpan.MaxValue || timeout == Timeout.InfiniteTimeSpan)
Internals\System\Runtime\TimeoutHelper.cs (9)
32_deadlineSet = (timeout == TimeSpan.MaxValue); 67return (timeout > MaxWait) && (timeout != TimeSpan.MaxValue); 74return TimeSpan.MaxValue; 84if (timeout == TimeSpan.MaxValue) 136if (timeout == TimeSpan.MaxValue) 138return TimeSpan.MaxValue; 153return TimeSpan.MaxValue; 210if (timeout == TimeSpan.MaxValue) 226if (timeout == TimeSpan.MaxValue)
System\ServiceModel\Channels\ChannelReliableSession.cs (1)
646return TimeSpan.MaxValue;
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (1)
935(bool success, RequestContext context) = await Binder.TryReceiveAsync(TimeSpan.MaxValue);
System\ServiceModel\Channels\ReliableOutputSessionChannel.cs (1)
816(bool success, RequestContext context) = await Binder.TryReceiveAsync(TimeSpan.MaxValue);
System\ServiceModel\Channels\ServiceChannel.cs (5)
442manager.CallOnce(TimeSpan.MaxValue, null); 452return manager.BeginCallOnce(TimeSpan.MaxValue, null, callback, state); 1971if (timeout != TimeSpan.MaxValue) 2340if (timeout != TimeSpan.MaxValue) 2416if (binder.HasSession && (idle != TimeSpan.MaxValue))
System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (1)
189if (binder._channelBinder.TryReceive(TimeSpan.MaxValue, out requestContext))
System\ServiceModel\Dispatcher\ChannelHandler.cs (3)
104Fx.Assert((_idleManager != null) == (Binder.HasSession && _listener.ChannelDispatcher.DefaultCommunicationTimeouts.ReceiveTimeout != TimeSpan.MaxValue), "idle manager is present only when there is a session with a finite receive timeout"); 229return _receiver.BeginTryReceive(TimeSpan.MaxValue, ChannelHandler.s_onAsyncReceiveComplete, this); 1126while (!TryReceive(TimeSpan.MaxValue, out request))
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (2)
823if (timeout != TimeSpan.MaxValue) 1178result = _innerChannel.BeginReceive(TimeSpan.MaxValue, s_receiveAsyncCallback, this);
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (2)
98Fx.Assert(TimeSpan.Parse(defaultClientMaxTokenCachingTimeString, CultureInfo.InvariantCulture) == TimeSpan.MaxValue, "TimeSpan value not correct"); 99return TimeSpan.MaxValue;
System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
494if (MaxClockSkew == TimeSpan.MaxValue || ReplayWindow == TimeSpan.MaxValue)
System\ServiceModel\Security\SecuritySessionClientSettings.cs (1)
1665Message message = await ReceiveInternalAsync(TimeSpan.MaxValue, null);
System.ServiceModel.UnixDomainSocket (5)
System\ServiceModel\Channels\SocketConnection.cs (5)
392ConvertSendException(socketException, TimeSpan.MaxValue, _asyncSendTimeout)); 502if (timeout == TimeSpan.MaxValue) 553if (timeout == TimeSpan.MaxValue) 805if (timeSpent == TimeSpan.MaxValue) 826if (timeSpent == TimeSpan.MaxValue)
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
972WaitForStatus(desiredStatus, TimeSpan.MaxValue);
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\ChainedReplenishingRateLimiter.cs (2)
27TimeSpan lowestPeriod = TimeSpan.MaxValue; 50_replenishmentPeriod = lowestPeriod == TimeSpan.MaxValue ? TimeSpan.Zero : lowestPeriod;
UnitTests.Common (1)
TestData.cs (1)
25{ TimeSpan.MaxValue},