144 references to MaxValue
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
379await outputCache.SetAsync("outputKey", [1, 2, 3, 4], tags: null, validFor: TimeSpan.MaxValue, cancellationToken: default);
BinaryFormatTests (4)
FormatTests\FormattedObject\HashTableTests.cs (1)
213{ TimeSpan.MinValue, TimeSpan.MaxValue }
FormatTests\FormattedObject\ListTests.cs (1)
33TimeSpan.MaxValue,
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
85{ (byte)PrimitiveType.TimeSpan, TimeSpan.MaxValue }, 135TimeSpan.MaxValue,
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;
IdeCoreBenchmarks (6)
SyntacticChangeRangeBenchmark.cs (6)
91SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 98SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 104SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, _rootWithSimpleEdit, TimeSpan.MaxValue, CancellationToken.None); 110SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, _rootWithComplexEdit, TimeSpan.MaxValue, CancellationToken.None); 117SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 124SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None);
InMemory.FunctionalTests (2)
Http3\Http3TimeoutTests.cs (2)
309limits.RequestHeadersTimeout = TimeSpan.MaxValue; 332Assert.Equal(TimeSpan.MaxValue.ToTicks(timeProvider), serverInboundControlStream.StreamTimeoutTimestamp);
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\DummyServer.cs (2)
20return Task.Delay(TimeSpan.MaxValue); 25return Task.Delay(TimeSpan.MaxValue);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (1)
18using var provider = new TestRevalidatingServerAuthenticationStateProvider(TimeSpan.MaxValue);
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingPolicyProviderTests.cs (2)
492context.CachedEntryAge = TimeSpan.MaxValue; 506context.CachedEntryAge = TimeSpan.MaxValue;
Microsoft.AspNetCore.Server.Kestrel.Core (13)
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)
121_handshakeTimeout = value != Timeout.InfiniteTimeSpan ? value : TimeSpan.MaxValue;
Internal\Http2\Http2Connection.cs (1)
174if (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.Core.Tests (9)
Http1\Http1ConnectionTests.cs (3)
166_http1Connection.MinRequestBodyDataRate = new MinDataRate(bytesPerSecond: 1, gracePeriod: TimeSpan.MaxValue); 176_http1Connection.MinResponseDataRate = new MinDataRate(bytesPerSecond: 1, gracePeriod: TimeSpan.MaxValue); 1186new MinDataRate(bytesPerSecond: 1, gracePeriod: TimeSpan.MaxValue)
KestrelServerLimitsTests.cs (3)
166Assert.Equal(TimeSpan.MaxValue, new KestrelServerLimits { KeepAliveTimeout = Timeout.InfiniteTimeSpan }.KeepAliveTimeout); 195Assert.Equal(TimeSpan.MaxValue, new KestrelServerLimits { RequestHeadersTimeout = Timeout.InfiniteTimeSpan }.RequestHeadersTimeout); 360TimeSpan.MaxValue,
MinDataRateTests.cs (3)
17Assert.Equal(value, new MinDataRate(bytesPerSecond: value, gracePeriod: TimeSpan.MaxValue).BytesPerSecond); 26var exception = Assert.Throws<ArgumentOutOfRangeException>(() => new MinDataRate(bytesPerSecond: value, gracePeriod: TimeSpan.MaxValue)); 52TimeSpan.MaxValue
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
HttpsConnectionAdapterOptionsTest.cs (2)
30Assert.Equal(TimeSpan.MaxValue, new HttpsConnectionAdapterOptions { HandshakeTimeout = Timeout.InfiniteTimeSpan }.HandshakeTimeout); 46TimeSpan.MaxValue,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Classification\SyntacticTaggerTests.cs (2)
49diffTimeout: TimeSpan.MaxValue); 103diffTimeout: TimeSpan.MaxValue);
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
94AdditionalValues: [TimeSpan.MinValue, TimeSpan.MaxValue],
Microsoft.Extensions.AI.OpenAI (2)
src\Shared\ServerSentEvents\SseParser_1.cs (2)
47private readonly long TimeSpan_MaxValueMilliseconds = (long)TimeSpan.MaxValue.TotalMilliseconds; 451TimeSpan timeSpan = milliseconds == TimeSpan_MaxValueMilliseconds ? TimeSpan.MaxValue : TimeSpan.FromMilliseconds(milliseconds);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.StampedeStateT.cs (1)
530private void SetResult(CacheItem<T> value) => SetResult(value, TimeSpan.MaxValue);
PresentationCore.Tests (1)
System\Windows\Media\Animation\RepeatBehavior.Tests.cs (1)
81yield return new object[] { TimeSpan.MaxValue };
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)
94AdditionalValues: [TimeSpan.MinValue, TimeSpan.MaxValue],
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (1)
34KeepAlivePingDelay = 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.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)
32private readonly long TimeSpan_MaxValueMilliseconds = (long)TimeSpan.MaxValue.TotalMilliseconds; 433TimeSpan timeSpan = milliseconds == TimeSpan_MaxValueMilliseconds ? TimeSpan.MaxValue : TimeSpan.FromMilliseconds(milliseconds);
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (15)
274/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 296/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 459/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 475/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 496/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 511/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 531/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 545/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 564/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 577/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 595/// The parameter specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 608/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 636/// The parameters specify a <see cref="TimeSpan"/> value less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/> 659return MaxValue; 672/// <paramref name="value"/> is less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/>.
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (3)
81new List<TimeSpan> { TimeSpan.MinValue, TimeSpan.MaxValue }, 101new TimeSpan[] { TimeSpan.MinValue, TimeSpan.MaxValue }, 123(ArrayList)([TimeSpan.MinValue, TimeSpan.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.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.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.Windows.Forms.Tests (1)
System\Resources\ResxDataNodeTests.cs (1)
136{ TimeSpan.MinValue, TimeSpan.MaxValue }
UnitTests.Common (1)
TestData.cs (1)
25{ TimeSpan.MaxValue},
WindowsBase.Tests (1)
System\Windows\Threading\DispatcherTimerTests.cs (1)
117yield return new object[] { TimeSpan.MaxValue };