227 references to InfiniteTimeSpan
Aspire.Cli.Tests (2)
Commands\RunCommandTests.cs (2)
201await Task.Delay(Timeout.InfiniteTimeSpan, ct); 256await Task.Delay(Timeout.InfiniteTimeSpan, ct);
Aspire.Dashboard (1)
Model\DebugSessionHelpers.cs (1)
40Timeout = Timeout.InfiniteTimeSpan
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
502client.Timeout = Timeout.InfiniteTimeSpan;
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
443return Timeout.InfiniteTimeSpan;
Aspire.Playground.Tests (1)
AppHostTests.cs (1)
121.ConfigureHttpClient(client => client.Timeout = Timeout.InfiniteTimeSpan)
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
502client.Timeout = Timeout.InfiniteTimeSpan;
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
160if (timeout == TimeSpan.MaxValue || timeout == Timeout.InfiniteTimeSpan)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
44if (timeout >= MaxWait || timeout == Timeout.InfiniteTimeSpan)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportSettings.cs (1)
66if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
30return Timeout.InfiniteTimeSpan;
HttpStress (1)
Program.cs (1)
514PooledConnectionLifetime = connectionLifetime.HasValue ? TimeSpan.FromMilliseconds(connectionLifetime.Value) : Timeout.InfiniteTimeSpan,
Infrastructure.Common (5)
xunit\WcfTestCase.cs (2)
54if (_failFastDuration != System.Threading.Timeout.InfiniteTimeSpan && !System.Diagnostics.Debugger.IsAttached) 125_failFastDuration = System.Threading.Timeout.InfiniteTimeSpan;
xunit\WcfTestDiscoverer.cs (3)
51Timeout.InfiniteTimeSpan, 80Timeout.InfiniteTimeSpan, 101TimeSpan failFastDuration = Timeout.InfiniteTimeSpan;
InMemory.FunctionalTests (3)
Http2\Http2KeepAliveTests.cs (2)
14_serviceContext.ServerOptions.Limits.Http2.KeepAlivePingDelay = Timeout.InfiniteTimeSpan; 28_serviceContext.ServerOptions.Limits.Http2.KeepAlivePingTimeout = Timeout.InfiniteTimeSpan;
KestrelMetricsTests.cs (1)
797KeepAlivePingDelay = Timeout.InfiniteTimeSpan
InteropTests (2)
Helpers\ClientProcess.cs (1)
38_processEx = new ProcessEx(output, _process, timeout: Timeout.InfiniteTimeSpan);
Helpers\WebsiteProcess.cs (1)
43_processEx = new ProcessEx(output, _process, Timeout.InfiniteTimeSpan);
Microsoft.AspNetCore.Components.Authorization.Tests (1)
AuthorizeViewTest.cs (1)
20private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\RemoteRendererTest.cs (1)
26private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
Microsoft.AspNetCore.Components.Tests (4)
ComponentBaseTest.cs (1)
14private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
NavigationManagerTest.cs (1)
17private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
RendererTest.cs (1)
22private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
Rendering\RendererSynchronizationContextTest.cs (1)
14public TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10);
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationDiagnosticsTests.cs (1)
38var timeout = !Debugger.IsAttached ? TimeSpan.FromSeconds(30) : Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.Http (1)
Timeouts\RequestTimeoutsMiddleware.cs (1)
84if (timeSpan is null || timeSpan == Timeout.InfiniteTimeSpan)
Microsoft.AspNetCore.Http.Connections (1)
HttpConnectionDispatcherOptions.cs (1)
135internal bool TransportSendTimeoutEnabled => _transportSendTimeout != Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.Http.Features (2)
WebSocketAcceptContext.cs (2)
34/// <see cref="Timeout.InfiniteTimeSpan"/> and <see cref="TimeSpan.Zero"/> are valid values and will disable the timeout. 44if (value is not null && value != Timeout.InfiniteTimeSpan)
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
30return Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
239return Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Http2Limits.cs (4)
165if (value < Heartbeat.Interval && value != Timeout.InfiniteTimeSpan) 170_keepAlivePingDelay = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue; 190if (value < Heartbeat.Interval && value != Timeout.InfiniteTimeSpan) 195_keepAlivePingTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
HttpsConnectionAdapterOptions.cs (3)
110/// or <see cref="Timeout.InfiniteTimeSpan"/>. Defaults to 10 seconds. 117if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 121_handshakeTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
KestrelServerLimits.cs (4)
181if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 185_keepAliveTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue; 200if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 204_requestHeadersTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
TlsHandshakeCallbackOptions.cs (3)
28/// or <see cref="Timeout.InfiniteTimeSpan"/>. Defaults to 10 seconds. 35if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 39_handshakeTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
KestrelServerLimitsTests.cs (2)
166Assert.Equal(TimeSpan.MaxValue, new KestrelServerLimits { KeepAliveTimeout = Timeout.InfiniteTimeSpan }.KeepAliveTimeout); 195Assert.Equal(TimeSpan.MaxValue, new KestrelServerLimits { RequestHeadersTimeout = Timeout.InfiniteTimeSpan }.RequestHeadersTimeout);
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
HttpsConnectionAdapterOptionsTest.cs (1)
30Assert.Equal(TimeSpan.MaxValue, new HttpsConnectionAdapterOptions { HandshakeTimeout = Timeout.InfiniteTimeSpan }.HandshakeTimeout);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
89IdleTimeout = Timeout.InfiniteTimeSpan, // Kestrel manages connection lifetimes itself so it can send GoAway's.
Microsoft.AspNetCore.Session (1)
SessionOptions.cs (1)
42/// Note this may only apply to asynchronous operations. This timeout can be disabled using <see cref="Timeout.InfiniteTimeSpan"/>.
Microsoft.AspNetCore.Shared.Tests (1)
NonCapturingTimerTest.cs (1)
27}, state: null, dueTime: TimeSpan.FromMilliseconds(1), Timeout.InfiniteTimeSpan);
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HubConnectionTests.ConnectionLifecycle.cs (1)
584hubConnection.HandshakeTimeout = Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.SignalR.Microbenchmarks (2)
BroadcastBenchmark.cs (1)
48KeepAliveInterval = Timeout.InfiniteTimeSpan,
HubConnectionContextBenchmark.cs (1)
44KeepAliveInterval = Timeout.InfiniteTimeSpan,
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxyingExtensions.cs (1)
71SpaProxy.CreateHttpClientForProxy(Timeout.InfiniteTimeSpan);
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
30return Timeout.InfiniteTimeSpan;
Microsoft.AspNetCore.WebSockets (4)
WebSocketOptions.cs (4)
11private TimeSpan _keepAliveTimeout = Timeout.InfiniteTimeSpan; 35/// Default value is <see cref="Timeout.InfiniteTimeSpan"/>. 36/// <see cref="Timeout.InfiniteTimeSpan"/> and <see cref="TimeSpan.Zero"/> will disable the timeout. 49if (value != Timeout.InfiniteTimeSpan)
Microsoft.Bcl.TimeProvider (5)
System\Threading\Tasks\TimeProviderTaskExtensions.cs (5)
44/// <param name="delay">The <see cref="TimeSpan"/> to wait before completing the returned task, or <see cref="Timeout.InfiniteTimeSpan"/> to wait indefinitely.</param> 48/// <exception cref="System.ArgumentOutOfRangeException"><paramref name="delay"/> represents a negative time interval other than <see cref="Timeout.InfiniteTimeSpan"/>.</exception> 129/// <exception cref="System.ArgumentOutOfRangeException"><paramref name="timeout"/> represents a negative time interval other than <see cref="Timeout.InfiniteTimeSpan"/>.</exception> 219/// <exception cref="System.ArgumentOutOfRangeException"><paramref name="timeout"/> represents a negative time interval other than <see cref="Timeout.InfiniteTimeSpan"/>.</exception> 234/// <exception cref="ArgumentOutOfRangeException"><paramref name="delay"/> is negative and not equal to <see cref="Timeout.InfiniteTimeSpan" /> or greater than maximum allowed timer duration.</exception>
Microsoft.CodeAnalysis.Workspaces (1)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
172if (startTime.Elapsed > timeout && timeout != Timeout.InfiniteTimeSpan)
Microsoft.Extensions.AI.Ollama (1)
OllamaUtilities.cs (1)
21Timeout = Timeout.InfiniteTimeSpan,
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientTests.cs (2)
368using HttpClient httpClient = new(handler) { Timeout = Timeout.InfiniteTimeSpan }; 459using HttpClient httpClient = new(handler) { Timeout = Timeout.InfiniteTimeSpan };
Microsoft.Extensions.AI.OpenAI (3)
src\Shared\ServerSentEvents\SseParser_1.cs (3)
473/// If no retry event was received, this defaults to <see cref="Timeout.InfiniteTimeSpan"/>, and it will only 474/// ever be <see cref="Timeout.InfiniteTimeSpan"/> in that situation. If a client wishes to retry, the server-sent 478public TimeSpan ReconnectionInterval { get; private set; } = Timeout.InfiniteTimeSpan;
Microsoft.Extensions.Diagnostics.HealthChecks (3)
HealthCheckPublisherOptions.cs (3)
35if (value == System.Threading.Timeout.InfiniteTimeSpan) 61if (value == System.Threading.Timeout.InfiniteTimeSpan) 82/// instances. Use <see cref="System.Threading.Timeout.InfiniteTimeSpan"/> to execute with no timeout.
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (5)
HealthCheckRegistration.cs (5)
61if (timeout <= TimeSpan.Zero && timeout != System.Threading.Timeout.InfiniteTimeSpan) 70Timeout = timeout ?? System.Threading.Timeout.InfiniteTimeSpan; 113if (timeout <= TimeSpan.Zero && timeout != System.Threading.Timeout.InfiniteTimeSpan) 122Timeout = timeout ?? System.Threading.Timeout.InfiniteTimeSpan; 152if (value <= TimeSpan.Zero && value != System.Threading.Timeout.InfiniteTimeSpan)
Microsoft.Extensions.Hosting (3)
HostOptions.cs (1)
34public TimeSpan StartupTimeout { get; set; } = Timeout.InfiniteTimeSpan;
Internal\Host.cs (2)
78if (_options.StartupTimeout != Timeout.InfiniteTimeSpan) 221if (_options.ShutdownTimeout != Timeout.InfiniteTimeSpan)
Microsoft.Extensions.Http (8)
ActiveHandlerTrackingEntry.cs (3)
46if (Lifetime == Timeout.InfiniteTimeSpan) 61Debug.Assert(Lifetime != Timeout.InfiniteTimeSpan); 71_timer = NonCapturingTimer.Create(_timerCallback, this, Lifetime, Timeout.InfiniteTimeSpan);
DefaultHttpClientFactory.cs (1)
228_cleanupTimer ??= NonCapturingTimer.Create(_cleanupCallback, this, DefaultCleanupInterval, Timeout.InfiniteTimeSpan);
DependencyInjection\HttpClientBuilderExtensions.cs (2)
595/// <see cref="Timeout.InfiniteTimeSpan"/> to disable handler expiry. 620if (handlerLifetime != Timeout.InfiniteTimeSpan && handlerLifetime < HttpClientFactoryOptions.MinimumHandlerLifetime)
HttpClientFactoryOptions.cs (2)
38/// Set the lifetime to <see cref="Timeout.InfiniteTimeSpan"/> to disable handler expiry. 64if (value != Timeout.InfiniteTimeSpan && value < MinimumHandlerLifetime)
Microsoft.Extensions.Http.Diagnostics (2)
Logging\Internal\HttpRequestBodyReader.cs (1)
43? Timeout.InfiniteTimeSpan
Logging\Internal\HttpResponseBodyReader.cs (1)
43? Timeout.InfiniteTimeSpan
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpRequestBodyReaderTest.cs (1)
248Assert.Equal(reader.RequestReadTimeout, Timeout.InfiniteTimeSpan);
Logging\HttpResponseBodyReaderTest.cs (1)
266Assert.Equal(reader.ResponseReadTimeout, Timeout.InfiniteTimeSpan);
Microsoft.Extensions.Http.Resilience (2)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
144_ = builder.ConfigureHttpClient(client => client.Timeout = Timeout.InfiniteTimeSpan);
Resilience\ResilienceHttpClientBuilderExtensions.StandardResilience.cs (1)
91_ = builder.ConfigureHttpClient(client => client.Timeout = Timeout.InfiniteTimeSpan);
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
HttpClientFactory.cs (4)
41.AddHttpClient(StandardClient, client => client.Timeout = Timeout.InfiniteTimeSpan) 47.AddHttpClient(EmptyClient, client => client.Timeout = Timeout.InfiniteTimeSpan) 50.AddHttpClient(SingleHandlerClient, client => client.Timeout = Timeout.InfiniteTimeSpan) 67var clientBuilder = services.AddHttpClient(clientType.ToString(), client => client.Timeout = Timeout.InfiniteTimeSpan);
Microsoft.Extensions.Http.Resilience.Tests (3)
Hedging\StandardHedgingTests.cs (2)
248Builder.Configure(config).Configure(options => options.Hedging.Delay = Timeout.InfiniteTimeSpan); 273client.Timeout.Should().Be(Timeout.InfiniteTimeSpan);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
268client.Timeout.Should().Be(Timeout.InfiniteTimeSpan);
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
42if (options.Timeout != Timeout.InfiniteTimeSpan) 879bool hasTimeout = timeout != System.Threading.Timeout.InfiniteTimeSpan;
Microsoft.Extensions.TimeProvider.Testing.Tests (3)
TimerTests.cs (3)
47using var timer = timeProvider.CreateTimer(_ => { counter++; }, null, TimeSpan.FromMilliseconds(10), Timeout.InfiniteTimeSpan); 69using var timer = timeProvider.CreateTimer(_ => { counter++; }, null, TimeSpan.Zero, Timeout.InfiniteTimeSpan); 91var timer = timeProvider.CreateTimer(_ => { counter++; }, null, Timeout.InfiniteTimeSpan, TimeSpan.FromMilliseconds(10));
Microsoft.Extensions.Validation.GeneratorTests (1)
ValidationsGeneratorTestBase.cs (1)
244return Timeout.InfiniteTimeSpan;
Microsoft.JSInterop (6)
JSObjectReferenceExtensions.cs (3)
97using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout); 115using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout); 165using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout);
JSRuntimeExtensions.cs (3)
97using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout); 115using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout); 165using var cancellationTokenSource = timeout == Timeout.InfiniteTimeSpan ? null : new CancellationTokenSource(timeout);
Microsoft.JSInterop.Tests (2)
JSRuntimeExtensionsTest.cs (2)
129var result = await jsRuntime.Object.InvokeAsync<string>(method, Timeout.InfiniteTimeSpan, args); 173await jsRuntime.Object.InvokeVoidAsync(method, Timeout.InfiniteTimeSpan, args);
Shared (3)
ServerSentEvents\SseParser_1.cs (3)
473/// If no retry event was received, this defaults to <see cref="Timeout.InfiniteTimeSpan"/>, and it will only 474/// ever be <see cref="Timeout.InfiniteTimeSpan"/> in that situation. If a client wishes to retry, the server-sent 478public TimeSpan ReconnectionInterval { get; private set; } = Timeout.InfiniteTimeSpan;
System.Net.Http (33)
src\libraries\Common\src\System\Net\Http\HttpHandlerDefaults.cs (2)
28public static readonly TimeSpan DefaultPooledConnectionLifetime = Timeout.InfiniteTimeSpan; 31public static readonly TimeSpan DefaultConnectTimeout = Timeout.InfiniteTimeSpan;
System\Net\Http\HttpClient.cs (1)
21private static readonly TimeSpan s_infiniteTimeout = Threading.Timeout.InfiniteTimeSpan;
System\Net\Http\HttpHandlerDefaults.cs (1)
16public static readonly TimeSpan DefaultKeepAlivePingDelay = Timeout.InfiniteTimeSpan;
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
509if (drainTime != Timeout.InfiniteTimeSpan)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
870if (pooledConnectionLifetime != Timeout.InfiniteTimeSpan) 881if (lifetime != Timeout.InfiniteTimeSpan)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (2)
745}, thisRef, nextAuthorityMaxAge, Timeout.InfiniteTimeSpan); 750_authorityExpireTimer.Change(nextAuthorityMaxAge, Timeout.InfiniteTimeSpan);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionWaiter.cs (1)
92pool.Settings._connectTimeout != Timeout.InfiniteTimeSpan && timeout > (int)pool.Settings._connectTimeout.TotalMilliseconds) // Do not override shorter ConnectTimeout
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
221if (drainTime != Timeout.InfiniteTimeSpan)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
353}, this, _connection._pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan).ConfigureAwait(false))
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
458if (_connection.Pool.Settings._expect100ContinueTimeout != Timeout.InfiniteTimeSpan) 461this, _connection.Pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
590allowExpect100ToContinue, _pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan);
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (2)
226if (pooledConnectionIdleTimeout != Timeout.InfiniteTimeSpan) 237if (pooledConnectionLifetime != Timeout.InfiniteTimeSpan)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (6)
78settings._keepAlivePingDelay == Timeout.InfiniteTimeSpan; 84if (settings._pooledConnectionIdleTimeout == Timeout.InfiniteTimeSpan) 115if (_settings._keepAlivePingDelay != Timeout.InfiniteTimeSpan) 469if (_cleaningTimer!.Change(timeout, Timeout.InfiniteTimeSpan)) 471_timerIsRunning = timeout != Timeout.InfiniteTimeSpan; 496SetCleaningTimer(!_pools.IsEmpty ? _cleanPoolTimeout : Timeout.InfiniteTimeSpan);
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (10)
178if ((value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) || 217if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 232if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 247if ((value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) || 263if ((value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) || 305/// Delay value must be greater than or equal to 1 second. Set to <see cref="Timeout.InfiniteTimeSpan"/> to 307/// Defaults to <see cref="Timeout.InfiniteTimeSpan"/>. 315if (value.Ticks < TimeSpan.TicksPerSecond && value != Timeout.InfiniteTimeSpan) 330/// Timeout must be greater than or equal to 1 second. Set to <see cref="Timeout.InfiniteTimeSpan"/> to 340if (value.Ticks < TimeSpan.TicksPerSecond && value != Timeout.InfiniteTimeSpan)
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
47if (timeout != Timeout.InfiniteTimeSpan)
System.Net.HttpListener (1)
System\Net\WebSockets\HttpWebSocket.cs (1)
92ArgumentOutOfRangeException.ThrowIfLessThan(keepAliveInterval, Timeout.InfiniteTimeSpan);
System.Net.Quic (9)
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
150settings.IdleTimeoutMs = options.IdleTimeout != Timeout.InfiniteTimeSpan 158settings.KeepAliveIntervalMs = options.KeepAliveInterval != Timeout.InfiniteTimeSpan 178settings.HandshakeIdleTimeoutMs = options.HandshakeTimeout != Timeout.InfiniteTimeSpan
System\Net\Quic\Internal\ThrowHelper.cs (1)
205if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
System\Net\Quic\QuicConnection.cs (1)
78if (options.HandshakeTimeout != Timeout.InfiniteTimeSpan && options.HandshakeTimeout != TimeSpan.Zero)
System\Net\Quic\QuicConnectionOptions.cs (2)
130/// Default <see cref="Timeout.InfiniteTimeSpan"/> means never sending keep alive packets. 132public TimeSpan KeepAliveInterval { get; set; } = Timeout.InfiniteTimeSpan;
System\Net\Quic\QuicStream.Stream.cs (2)
45private TimeSpan _readTimeout = Timeout.InfiniteTimeSpan; 46private TimeSpan _writeTimeout = Timeout.InfiniteTimeSpan;
System.Net.Requests (3)
src\libraries\Common\src\System\Net\Http\HttpHandlerDefaults.cs (2)
28public static readonly TimeSpan DefaultPooledConnectionLifetime = Timeout.InfiniteTimeSpan; 31public static readonly TimeSpan DefaultConnectTimeout = Timeout.InfiniteTimeSpan;
System\Net\HttpWebRequest.cs (1)
141? Threading.Timeout.InfiniteTimeSpan
System.Net.ServerSentEvents (3)
System\Net\ServerSentEvents\SseParser_1.cs (3)
455/// If no retry event was received, this defaults to <see cref="Timeout.InfiniteTimeSpan"/>, and it will only 456/// ever be <see cref="Timeout.InfiniteTimeSpan"/> in that situation. If a client wishes to retry, the server-sent 460public TimeSpan ReconnectionInterval { get; private set; } = Timeout.InfiniteTimeSpan;
System.Net.Sockets (3)
System\Net\Sockets\Socket.cs (3)
2361/// <param name="timeout">The time to wait for a response. <see cref="Timeout.InfiniteTimeSpan"/> indicates an infinite timeout.</param> 2425/// <param name="timeout">The timeout value. A value equal to <see cref="Timeout.InfiniteTimeSpan"/> indicates an infinite timeout.</param> 2436if (timeout == Timeout.InfiniteTimeSpan)
System.Net.WebSockets (13)
src\libraries\Common\src\System\Net\WebSockets\WebSocketDefaults.cs (1)
17public static readonly TimeSpan DefaultKeepAliveTimeout = Timeout.InfiniteTimeSpan;
System\Net\WebSockets\ManagedWebSocket.cs (2)
146Debug.Assert(keepAliveInterval == Timeout.InfiniteTimeSpan || keepAliveInterval >= TimeSpan.Zero, $"Invalid {nameof(keepAliveInterval)}: {keepAliveInterval}"); 147Debug.Assert(keepAliveTimeout == Timeout.InfiniteTimeSpan || keepAliveTimeout >= TimeSpan.Zero, $"Invalid {nameof(keepAliveTimeout)}: {keepAliveTimeout}");
System\Net\WebSockets\WebSocket.cs (3)
130/// <param name="keepAliveInterval">The keep-alive interval to use, or <see cref="Timeout.InfiniteTimeSpan"/> to disable keep-alives.</param> 146if (keepAliveInterval != Timeout.InfiniteTimeSpan && keepAliveInterval < TimeSpan.Zero) 200if (keepAliveInterval != Timeout.InfiniteTimeSpan && keepAliveInterval < TimeSpan.Zero)
System\Net\WebSockets\WebSocketCreationOptions.cs (5)
39/// The keep-alive interval to use, or <see cref="TimeSpan.Zero"/> or <see cref="Timeout.InfiniteTimeSpan"/> to disable keep-alives. 49if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero) 60/// <see cref="Timeout.InfiniteTimeSpan"/> to disable waiting for peer's response, and use an unsolicited PONG as a Keep-Alive heartbeat instead. 61/// The default is <see cref="Timeout.InfiniteTimeSpan"/>. 68if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero)
System\Net\WebSockets\WebSocketStream.cs (2)
54if (closeTimeout < TimeSpan.Zero && closeTimeout != Timeout.InfiniteTimeSpan) 261else if (timeout == Timeout.InfiniteTimeSpan)
System.Net.WebSockets.Client (8)
src\libraries\Common\src\System\Net\WebSockets\WebSocketDefaults.cs (1)
17public static readonly TimeSpan DefaultKeepAliveTimeout = Timeout.InfiniteTimeSpan;
System\Net\WebSockets\ClientWebSocketOptions.cs (7)
176/// The keep-alive interval to use, or <see cref="TimeSpan.Zero"/> or <see cref="Timeout.InfiniteTimeSpan"/> to disable keep-alives. 188if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero) 192Timeout.InfiniteTimeSpan.ToString())); 200/// <see cref="Timeout.InfiniteTimeSpan"/> to disable waiting for peer's response, and use an unsolicited PONG as a Keep-Alive heartbeat instead. 201/// The default is <see cref="Timeout.InfiniteTimeSpan"/>. 210if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero) 214Timeout.InfiniteTimeSpan.ToString()));
System.Private.CoreLib (19)
src\libraries\Common\src\System\Threading\ITimer.cs (2)
16/// Specify <see cref="Timeout.InfiniteTimeSpan"/> to prevent the timer from restarting. Specify <see cref="TimeSpan.Zero"/> to restart the timer immediately. 20/// Specify <see cref="Timeout.InfiniteTimeSpan"/> to disable periodic signaling.
src\libraries\Common\src\System\TimeProvider.cs (2)
133/// <param name="dueTime">The amount of time to delay before <paramref name="callback"/> is invoked. Specify <see cref="Timeout.InfiniteTimeSpan"/> to prevent the timer from starting. Specify <see cref="TimeSpan.Zero"/> to start the timer immediately.</param> 134/// <param name="period">The time interval between invocations of <paramref name="callback"/>. Specify <see cref="Timeout.InfiniteTimeSpan"/> to disable periodic signaling.</param>
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (4)
214_timer = new TimerQueueTimer(s_timerCallback, this, millisecondsDelay, Timeout.InfiniteTimeSpan, flowExecutionContext: false); 220_timer = timeProvider.CreateTimer(s_timerCallback, this, millisecondsDelay, Timeout.InfiniteTimeSpan); 458millisecondsDelay == Timeout.UnsignedInfinite ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(millisecondsDelay), 459Timeout.InfiniteTimeSpan);
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (4)
29/// <exception cref="ArgumentOutOfRangeException"><paramref name="period"/> must be <see cref="Timeout.InfiniteTimeSpan"/> or represent a number of milliseconds equal to or larger than 1 and smaller than <see cref="uint.MaxValue"/>.</exception> 47/// <exception cref="ArgumentOutOfRangeException"><paramref name="period"/> must be <see cref="Timeout.InfiniteTimeSpan"/> or represent a number of milliseconds equal to or larger than 1 and smaller than <see cref="uint.MaxValue"/>.</exception> 81/// <exception cref="ArgumentOutOfRangeException"><paramref name="value"/> must be <see cref="Timeout.InfiniteTimeSpan"/> or represent a number of milliseconds equal to or larger than 1 and smaller than <see cref="uint.MaxValue"/>.</exception> 113if ((ms >= 1 && ms <= Timer.MaxSupportedTimeout) || value == Timeout.InfiniteTimeSpan)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
2659/// <param name="timeout">The time to wait, or <see cref="Timeout.InfiniteTimeSpan"/> to wait indefinitely</param> 2891_timer = timeProvider.CreateTimer(callback, this, TimeSpan.FromMilliseconds(millisecondsDelay), Timeout.InfiniteTimeSpan); 5688/// <param name="delay">The <see cref="TimeSpan"/> to wait before completing the returned task, or <see cref="Timeout.InfiniteTimeSpan"/> to wait indefinitely.</param> 5691/// <exception cref="ArgumentOutOfRangeException"><paramref name="delay"/> represents a negative time interval other than <see cref="Timeout.InfiniteTimeSpan"/>.</exception> 5718/// <param name="delay">The <see cref="TimeSpan"/> to wait before completing the returned task, or <see cref="Timeout.InfiniteTimeSpan"/> to wait indefinitely.</param> 5722/// <exception cref="ArgumentOutOfRangeException"><paramref name="delay"/> represents a negative time interval other than <see cref="Timeout.InfiniteTimeSpan"/>.</exception> 5816_timer = timeProvider.CreateTimer(s_timerCallback, this, TimeSpan.FromMilliseconds(millisecondsDelay), Timeout.InfiniteTimeSpan);
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\IdlingCommunicationPool.cs (5)
168_idleTimer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan); 183_idleTimer = new Timer(new TimerCallback(new Action<object>(s_onIdle)), this, _idleTimeout, Timeout.InfiniteTimeSpan); 187_idleTimer.Change(_idleTimeout, Timeout.InfiniteTimeSpan); 270_idleTimer.Change(_idleTimeout, Timeout.InfiniteTimeSpan);
System.ServiceModel.UnixDomainSocket (2)
System\ServiceModel\Channels\SocketConnection.cs (2)
517_receiveTimer.Change(timeout, Timeout.InfiniteTimeSpan); 565_sendTimer.Change(timeout, Timeout.InfiniteTimeSpan);
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Regex.Timeout.cs (1)
34public static readonly TimeSpan InfiniteMatchTimeout = Timeout.InfiniteTimeSpan;
System.Threading.Tasks.Dataflow (1)
Internal\Common.cs (1)
415internal static readonly TimeSpan InfiniteTimeSpan = Timeout.InfiniteTimeSpan;