954 references to Zero
Aspire.Dashboard (3)
Otlp\Storage\TelemetryRepository.cs (1)
498MaxDuration = TimeSpan.Zero
src\Shared\ChannelExtensions.cs (1)
41if (s > TimeSpan.Zero)
Utils\CallbackThrottler.cs (1)
50if (s > TimeSpan.Zero)
Aspire.Dashboard.Components.Tests (1)
Shared\TestTimeProvider.cs (1)
17UtcNow = new DateTimeOffset(2025, 12, 20, 23, 59, 59, TimeSpan.Zero);
Aspire.Hosting (4)
Dcp\DcpHost.cs (1)
82bool requireContainerRuntimeInitialization = _dcpOptions.ContainerRuntimeInitializationTimeout > TimeSpan.Zero;
Health\ResourceHealthCheckService.cs (2)
156report = new HealthReport(registrationKeysToCheck.ToDictionary(k => k, k => new HealthReportEntry(HealthStatus.Unhealthy, "Error calling HealthCheckService.", TimeSpan.Zero, ex, data: null)), TimeSpan.Zero);
src\Shared\ChannelExtensions.cs (1)
41if (s > TimeSpan.Zero)
Aspire.Hosting.Testing.Tests (1)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (1)
63return new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
Aspire.Hosting.Tests (1)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (1)
63return new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
115if (parent.Duration == TimeSpan.Zero)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
DistributedCacheConformanceTests.cs (1)
56builder.Services.Configure<StackExchangeRedisInstrumentationOptions>(options => options.FlushInterval = TimeSpan.Zero);
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
OutputCacheConformanceTests.cs (1)
56builder.Services.Configure<StackExchangeRedisInstrumentationOptions>(options => options.FlushInterval = TimeSpan.Zero);
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
277builder.Services.Configure<StackExchangeRedisInstrumentationOptions>(options => options.FlushInterval = TimeSpan.Zero);
dotnet-svcutil-lib (87)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriter.cs (1)
309if (value.Offset != TimeSpan.Zero)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (9)
26Contract.Assert(timeout >= TimeSpan.Zero, "timeout must be non-negative"); 48else if (timeout > TimeSpan.Zero) 121if (timeout >= TimeSpan.Zero && DateTime.MaxValue - time <= timeout) 125if (timeout <= TimeSpan.Zero && DateTime.MinValue - time >= timeout) 134return Add(time, TimeSpan.Zero - timeout); 161if (remaining <= TimeSpan.Zero) 163return TimeSpan.Zero; 191if (timeout < TimeSpan.Zero) 204if (timeout <= TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Binding.cs (4)
51if (value < TimeSpan.Zero) 105if (value < TimeSpan.Zero) 123if (value < TimeSpan.Zero) 151if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedConnection.cs (4)
47_pendingTimeout = TimeSpan.Zero; 77_pendingTimeout = TimeSpan.Zero; 111if (immediate || _flushTimeout == TimeSpan.Zero) 131if (immediate || _flushTimeout == TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CommunicationObject.cs (2)
154if (timeout < TimeSpan.Zero) 329if (timeout < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionOrientedTransportChannelFactory.cs (1)
244ReleaseConnectionPool(localConnectionPool, TimeSpan.Zero);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPoolHelper.cs (4)
90_connectionPool.ReturnConnection(_connectionKey, localRawConnection, false, TimeSpan.Zero); 172_connectionPool.ReturnConnection(_connectionKey, localRawConnection, false, TimeSpan.Zero); 228_connectionPool.ReturnConnection(_connectionKey, rawConnection, false, TimeSpan.Zero); 246ReleaseConnection(true, TimeSpan.Zero);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
800if (timeout <= TimeSpan.Zero) 840if (timeout <= TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpTransportBindingElement.cs (1)
304if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (3)
285if (timeout < TimeSpan.Zero) 336if (timeout < TimeSpan.Zero) 406if (timeout < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LocalClientSecuritySettings.cs (6)
80if (value < TimeSpan.Zero) 104if (value < TimeSpan.Zero) 140if (value < TimeSpan.Zero) 176if (value < TimeSpan.Zero) 217if (value < TimeSpan.Zero) 241if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LocalServiceSecuritySettings.cs (8)
86if (value < TimeSpan.Zero) 108if (value < TimeSpan.Zero) 143if (value < TimeSpan.Zero) 181if (value < TimeSpan.Zero) 219if (value < TimeSpan.Zero) 241if (value < TimeSpan.Zero) 263if (value < TimeSpan.Zero) 297if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\NamedPipeConnectionPoolSettings.cs (1)
46if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\OutputChannel.cs (2)
34if (timeout < TimeSpan.Zero) 79if (timeout < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ReliableSessionBindingElement.cs (2)
59if (value <= TimeSpan.Zero) 95if (value <= TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestChannel.cs (1)
263if (timeout < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestContextBase.cs (1)
127if (timeout < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
322if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (3)
220remainingTime <= TimeSpan.Zero) 551if (timeoutHelper.RemainingTime() == TimeSpan.Zero) 603if (timeoutHelper.RemainingTime() == TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (2)
71this.Open(TimeSpan.Zero); 88Open(TimeSpan.Zero);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TcpConnectionPoolSettings.cs (2)
49if (value < TimeSpan.Zero) 70if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (2)
389this.ReturnConnectionIfNecessary(true, TimeSpan.Zero); 395this.ReturnConnectionIfNecessary(true, TimeSpan.Zero);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UdpRetransmissionSettings.cs (12)
50if (delayLowerBound < TimeSpan.Zero) 52throw FxTrace.Exception.ArgumentOutOfRange("delayLowerBound", delayLowerBound, string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero)); 55if (delayUpperBound < TimeSpan.Zero) 57throw FxTrace.Exception.ArgumentOutOfRange("delayUpperBound", delayUpperBound, string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero)); 60if (maxDelayPerRetransmission < TimeSpan.Zero) 63string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero)); 128if (value < TimeSpan.Zero) 130throw FxTrace.Exception.ArgumentOutOfRange("value", value, string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero)); 146if (value < TimeSpan.Zero) 148throw FxTrace.Exception.ArgumentOutOfRange("value", value, string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero)); 164if (value < TimeSpan.Zero) 166throw FxTrace.Exception.ArgumentOutOfRange("value", value, string.Format(SRServiceModel.ArgumentOutOfMinRange, TimeSpan.Zero));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportSettings.cs (1)
66if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
121if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (1)
55_transactionTimeout = TimeSpan.Zero;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\InputChannelBinder.cs (2)
169: base(request, TimeSpan.Zero, TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\ReliableSession.cs (1)
42if (value <= TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\NonceCache.cs (1)
25if (value < TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityChannel.cs (1)
57_securityProtocol.Close(true, TimeSpan.Zero);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (3)
417if (value < TimeSpan.Zero) 464if (value <= TimeSpan.Zero) 575if (value <= TimeSpan.Zero)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (2)
677CloseCommunicationObject(tokenProvider, true, TimeSpan.Zero); 697CloseCommunicationObject(tokenAuthenticator, true, TimeSpan.Zero);
IdeCoreBenchmarks (2)
IncrementalSourceGeneratorBenchmarks.cs (1)
158var totalIncrementalTime = TimeSpan.Zero;
NavigateToBenchmarks.cs (1)
188var indexTime = TimeSpan.Zero;
InMemory.FunctionalTests (5)
KeepAliveTimeoutTests.cs (3)
112for (var totalDelay = TimeSpan.Zero; totalDelay < _longDelay; totalDelay += _shortDelay) 157for (var totalDelay = TimeSpan.Zero; totalDelay < _longDelay; totalDelay += _shortDelay) 232for (var totalDelay = TimeSpan.Zero; totalDelay < _longDelay; totalDelay += _shortDelay)
KestrelMetricsTests.cs (2)
277ShutdownTimeout = TimeSpan.Zero 614ShutdownTimeout = TimeSpan.Zero,
KeyManagementSimulator (2)
Program.cs (2)
189var totalProblemTime = TimeSpan.Zero; 316private TimeSpan _cumulativeProblemTime = TimeSpan.Zero;
Microsoft.AspNetCore.Authentication.Core.Test (4)
AuthenticationPropertiesTests.cs (4)
311ExpiresUtc = new DateTimeOffset(2021, 03, 28, 13, 47, 00, TimeSpan.Zero), 312IssuedUtc = new DateTimeOffset(2021, 03, 28, 12, 47, 00, TimeSpan.Zero), 367ExpiresUtc = new DateTimeOffset(2021, 03, 28, 13, 47, 00, TimeSpan.Zero), 368IssuedUtc = new DateTimeOffset(2021, 03, 28, 12, 47, 00, TimeSpan.Zero),
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectOptions.cs (1)
95if (MaxAge.HasValue && MaxAge.Value < TimeSpan.Zero)
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationMiddlewareTests.cs (2)
823var firstExpiration = new DateTimeOffset(2021, 5, 12, 2, 3, 4, TimeSpan.Zero); 824var secondExpiration = new DateTimeOffset(2021, 5, 11, 2, 3, 4, TimeSpan.Zero);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\DefaultInMemoryCircuitPersistenceProviderTest.cs (1)
179UtcNow = new DateTimeOffset(2020, 1, 1, 0, 0, 0, TimeSpan.Zero);
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsPolicy.cs (1)
126if (value < TimeSpan.Zero)
Infrastructure\CorsResult.cs (1)
68if (value < TimeSpan.Zero)
Microsoft.AspNetCore.DataProtection (2)
DataProtectionBuilderExtensions.cs (1)
405if (lifetime < TimeSpan.Zero)
KeyManagement\KeyManagementOptions.cs (1)
83/// the allowed clock skew window. This value can be set to <see cref="TimeSpan.Zero"/>
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
82DateTimeOffset embeddedExpiration = new DateTimeOffset(checked((long)utcTicksExpiration), TimeSpan.Zero /* UTC */);
Microsoft.AspNetCore.DataProtection.Tests (9)
KeyManagement\DefaultKeyResolverTests.cs (2)
321DefaultKeyResolverRetryDelay = TimeSpan.Zero, 398DefaultKeyResolverRetryDelay = TimeSpan.Zero,
KeyManagement\XmlKeyManagerTests.cs (7)
78var creationDate = new DateTimeOffset(2014, 01, 01, 0, 0, 0, TimeSpan.Zero); 79var activationDate = new DateTimeOffset(2014, 02, 01, 0, 0, 0, TimeSpan.Zero); 80var expirationDate = new DateTimeOffset(2014, 03, 01, 0, 0, 0, TimeSpan.Zero); 165var creationDate = new DateTimeOffset(2014, 01, 01, 0, 0, 0, TimeSpan.Zero); 166var activationDate = new DateTimeOffset(2014, 02, 01, 0, 0, 0, TimeSpan.Zero); 167var expirationDate = new DateTimeOffset(2014, 03, 01, 0, 0, 0, TimeSpan.Zero); 685var revocationDate = new DateTimeOffset(2014, 01, 01, 0, 0, 0, TimeSpan.Zero);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Logging\AcceptanceTests.cs (1)
181var totalTimeWaiting = TimeSpan.Zero;
Microsoft.AspNetCore.Hosting (1)
Internal\HostingApplicationDiagnostics.cs (1)
475if (activity.Duration == TimeSpan.Zero)
Microsoft.AspNetCore.Hosting.Tests (2)
HostingApplicationDiagnosticsTests.cs (2)
644Assert.True(Activity.Current.Duration > TimeSpan.Zero); 668Assert.True(Activity.Current.Duration > TimeSpan.Zero);
Microsoft.AspNetCore.Http.Connections (1)
HttpConnectionDispatcherOptions.cs (1)
112ArgumentOutOfRangeException.ThrowIfEqual(value, TimeSpan.Zero);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
107var expected = new DateTimeOffset(2023, 12, 04, 7, 28, 00, TimeSpan.Zero);
Microsoft.AspNetCore.Http.Features (3)
WebSocketAcceptContext.cs (3)
34/// <see cref="Timeout.InfiniteTimeSpan"/> and <see cref="TimeSpan.Zero"/> are valid values and will disable the timeout. 37/// <see cref="TimeSpan"/> is less than <see cref="TimeSpan.Zero"/>. 46ArgumentOutOfRangeException.ThrowIfLessThan(value.Value, TimeSpan.Zero);
Microsoft.AspNetCore.Http.Tests (1)
ResponseCookiesTest.cs (1)
182var time = new DateTimeOffset(2000, 1, 1, 1, 1, 1, 1, TimeSpan.Zero);
Microsoft.AspNetCore.HttpLogging (1)
W3CLoggerOptions.cs (1)
97if (value <= TimeSpan.Zero)
Microsoft.AspNetCore.Identity (1)
DataProtectorTokenProvider.cs (1)
207=> new DateTimeOffset(reader.ReadInt64(), TimeSpan.Zero);
Microsoft.AspNetCore.Identity.Test (4)
SecurityStampValidatorTest.cs (4)
102options.Setup(a => a.Value).Returns(new SecurityStampValidatorOptions { ValidationInterval = TimeSpan.Zero }); 165options.Setup(a => a.Value).Returns(new SecurityStampValidatorOptions { ValidationInterval = TimeSpan.Zero }); 206options.Setup(a => a.Value).Returns(new SecurityStampValidatorOptions { ValidationInterval = TimeSpan.Zero }); 330options.Setup(a => a.Value).Returns(new SecurityStampValidatorOptions { ValidationInterval = TimeSpan.Zero });
Microsoft.AspNetCore.Mvc.Core.Test (12)
FileResultHelperTest.cs (12)
388{ new DateTimeOffset(2018, 4, 9, 11, 23, 22, TimeSpan.Zero), 200 }, 389{ new DateTimeOffset(2018, 4, 9, 11, 24, 21, TimeSpan.Zero), 200 }, 390{ new DateTimeOffset(2018, 4, 9, 11, 24, 22, TimeSpan.Zero), 304 }, 391{ new DateTimeOffset(2018, 4, 9, 11, 24, 23, TimeSpan.Zero), 304 }, 392{ new DateTimeOffset(2018, 4, 9, 11, 25, 22, TimeSpan.Zero), 304 }, 412LastModified = new DateTimeOffset(ticks, TimeSpan.Zero) 428{ new DateTimeOffset(2018, 4, 9, 11, 23, 22, TimeSpan.Zero), 412 }, 429{ new DateTimeOffset(2018, 4, 9, 11, 24, 21, TimeSpan.Zero), 412 }, 430{ new DateTimeOffset(2018, 4, 9, 11, 24, 22, TimeSpan.Zero), 200 }, 431{ new DateTimeOffset(2018, 4, 9, 11, 24, 23, TimeSpan.Zero), 200 }, 432{ new DateTimeOffset(2018, 4, 9, 11, 25, 22, TimeSpan.Zero), 200 }, 450LastModified = new DateTimeOffset(ticks, TimeSpan.Zero)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
CacheTagHelperTest.cs (3)
326var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); 379var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); 432var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero);
DistributedCacheTagHelperTest.cs (3)
349var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); 411var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); 473var currentTime = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero);
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheMiddleware.cs (3)
263context.CachedEntryAge = cacheEntryAge > TimeSpan.Zero ? cacheEntryAge : TimeSpan.Zero; 273if (context.CachedEntryAge <= TimeSpan.Zero)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
RedisOutputCacheStore.cs (2)
105await ExecuteGarbageCollectionAsync(GetExpirationTimestamp(TimeSpan.Zero), _disposalCancellation.Token).ConfigureAwait(false); 482return ticks == 0 ? DateTimeOffset.MinValue : new DateTimeOffset(ticks, TimeSpan.Zero);
Microsoft.AspNetCore.OutputCaching.Tests (6)
OutputCacheEntryFormatterTests.cs (3)
35await OutputCacheEntryFormatter.StoreAsync(key, entry, null, TimeSpan.Zero, store, NullLogger.Instance, default); 54await OutputCacheEntryFormatter.StoreAsync(key, entry, new HashSet<string>() { "tag", "タグ" }, TimeSpan.Zero, store, NullLogger.Instance, default); 72await OutputCacheEntryFormatter.StoreAsync(key, entry, null, TimeSpan.Zero, store, NullLogger.Instance, default);
OutputCacheMiddlewareTests.cs (3)
83TimeSpan.Zero, 113TimeSpan.Zero, 141TimeSpan.Zero,
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingMiddleware.cs (2)
147context.CachedEntryAge = cachedEntryAge > TimeSpan.Zero ? cachedEntryAge : TimeSpan.Zero;
Microsoft.AspNetCore.ResponseCaching.Tests (7)
ResponseCachingMiddlewareTests.cs (6)
66TimeSpan.Zero); 94TimeSpan.Zero); 115TimeSpan.Zero); 135TimeSpan.Zero); 143TimeSpan.Zero); 167TimeSpan.Zero);
ResponseCachingPolicyProviderTests.cs (1)
524context.CachedEntryAge = TimeSpan.Zero;
Microsoft.AspNetCore.Rewrite (1)
UrlActions\ChangeCookieAction.cs (1)
43if (Lifetime > TimeSpan.Zero)
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
706if (expiresOffset > TimeSpan.Zero)
RequestProcessing\Response.cs (1)
312if (_cacheTtl.HasValue && _cacheTtl.Value > TimeSpan.Zero)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
HttpsConnectionAdapterOptions.cs (1)
117if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
Internal\Infrastructure\TimeExtensions.cs (1)
13if (timeSpan < TimeSpan.Zero)
Internal\Infrastructure\TimeoutControl.cs (2)
314if (timeSpan < TimeSpan.Zero) 328if (timeSpan < TimeSpan.Zero)
KestrelServerLimits.cs (2)
181if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan) 200if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
TlsHandshakeCallbackOptions.cs (1)
35if (value <= TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
KestrelServerLimitsTests.cs (1)
367TimeSpan.Zero
MinDataRateTests.cs (1)
59TimeSpan.Zero,
PinnedBlockMemoryPoolFactoryTests.cs (1)
102while (pool.BlockCount() > previousCount - (previousCount / 30) && maxWait > TimeSpan.Zero)
PinnedBlockMemoryPoolTests.cs (2)
206while (memoryPool.BlockCount() > previousCount - (previousCount / 30) && maxWait > TimeSpan.Zero) 221while (memoryPool.BlockCount() > previousCount - (previousCount / 30) && maxWait > TimeSpan.Zero)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
HttpsConnectionAdapterOptionsTest.cs (1)
53TimeSpan.Zero
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1134UtcNow = new DateTimeOffset(2013, 1, 1, 1, 0, 0, TimeSpan.Zero);
Microsoft.AspNetCore.SignalR (1)
SignalRDependencyInjectionExtensions.cs (1)
44services.Configure<WebSocketOptions>(o => o.KeepAliveInterval = TimeSpan.Zero);
Microsoft.AspNetCore.SignalR.Client.Core (2)
HubConnection.cs (1)
1815var nextRetryDelay = GetNextRetryDelay(previousReconnectAttempts, TimeSpan.Zero, retryReason);
Internal\DefaultRetryPolicy.cs (1)
12TimeSpan.Zero,
Microsoft.AspNetCore.SignalR.Client.Tests (22)
HubConnectionTests.Reconnect.cs (22)
120return TimeSpan.Zero; 162Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 172Assert.True(TimeSpan.Zero <= retryContexts[1].ElapsedTime); 221return context.PreviousRetryCount == 0 ? TimeSpan.Zero : (TimeSpan?)null; 259Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 270Assert.True(TimeSpan.Zero <= retryContexts[1].ElapsedTime); 316return context.PreviousRetryCount == 0 ? TimeSpan.Zero : (TimeSpan?)null; 396return TimeSpan.Zero; 436Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 454Assert.Equal(TimeSpan.Zero, retryContexts[1].ElapsedTime); 494return TimeSpan.Zero; 542Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 581return TimeSpan.Zero; 757return TimeSpan.Zero; 803Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 813Assert.True(TimeSpan.Zero <= retryContexts[0].ElapsedTime); 864return TimeSpan.Zero; 910Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 932Assert.True(TimeSpan.Zero <= retryContexts[0].ElapsedTime); 990return TimeSpan.Zero; 1030Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime); 1107Assert.Equal(TimeSpan.Zero, retryContexts[0].ElapsedTime);
Microsoft.AspNetCore.SignalR.Core (1)
HubConnectionContext.cs (1)
776_receivedMessageElapsed = TimeSpan.Zero;
Microsoft.AspNetCore.SignalR.Microbenchmarks (2)
DefaultHubDispatcherBenchmark.cs (1)
47KeepAliveInterval = TimeSpan.Zero,
DefaultHubLifetimeManagerBenchmark.cs (1)
53KeepAliveInterval = TimeSpan.Zero,
Microsoft.AspNetCore.StaticAssets.Tests (3)
StaticAssetsIntegrationTests.cs (3)
586new("Last-Modified", new DateTimeOffset(2023,03,03,0,0,0,TimeSpan.Zero).ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)) 766Assert.Equal(response.Content.Headers.LastModified.Value.Offset, TimeSpan.Zero); 1087public DateTimeOffset LastModified => new(2023, 03, 03, 0, 0, 0, TimeSpan.Zero);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
111var trimmed = new DateTimeOffset(last.Year, last.Month, last.Day, last.Hour, last.Minute, last.Second, TimeSpan.Zero).ToUniversalTime();
Microsoft.AspNetCore.StaticFiles.Tests (5)
CacheHeaderTests.cs (1)
172Assert.Equal(response.Content.Headers.LastModified.Value.Offset, TimeSpan.Zero);
StaticFileContextTest.cs (4)
43LastModified = new DateTimeOffset(2014, 1, 2, 3, 4, 5, TimeSpan.Zero) 69LastModified = new DateTimeOffset(2014, 1, 2, 3, 4, 5, TimeSpan.Zero) 98LastModified = new DateTimeOffset(2014, 1, 2, 3, 4, 5, TimeSpan.Zero) 125LastModified = new DateTimeOffset(2014, 1, 2, 3, 4, 5, TimeSpan.Zero)
Microsoft.AspNetCore.WebSockets (3)
WebSocketOptions.cs (3)
36/// <see cref="Timeout.InfiniteTimeSpan"/> and <see cref="TimeSpan.Zero"/> will disable the timeout. 39/// <see cref="TimeSpan"/> is less than <see cref="TimeSpan.Zero"/>. 51ArgumentOutOfRangeException.ThrowIfLessThan(value, TimeSpan.Zero);
Microsoft.Build (4)
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
131info.NestedProcessTerminationTimeout = TimeSpan.Zero;
BackEnd\Components\Scheduler\ScheduleTimeRecord.cs (1)
32_accumulatedTime = TimeSpan.Zero;
Evaluation\Profiler\EvaluationProfiler.cs (2)
146previousTimeSpent = new ProfiledLocation(TimeSpan.Zero, TimeSpan.Zero, 0);
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BinaryTranslator_Tests.cs (2)
107HelperTestSimpleType(TimeSpan.Zero, val); 108HelperTestSimpleType(val, TimeSpan.Zero);
Telemetry\Telemetry_Tests.cs (8)
83workerNodeTelemetryData.TasksExecutionData[(TaskOrTargetTelemetryKey)"Microsoft.Build.Tasks.Message"].CumulativeExecutionTime.ShouldBeGreaterThan(TimeSpan.Zero); 85workerNodeTelemetryData.TasksExecutionData[(TaskOrTargetTelemetryKey)"Microsoft.Build.Tasks.CreateItem"].CumulativeExecutionTime.ShouldBeGreaterThan(TimeSpan.Zero); 89.Count(v => v.CumulativeExecutionTime > TimeSpan.Zero || v.ExecutionsCount > 0).ShouldBe(2); 158workerNodeTelemetryData.TasksExecutionData[(TaskOrTargetTelemetryKey)"Microsoft.Build.Tasks.Message"].CumulativeExecutionTime.ShouldBeGreaterThan(TimeSpan.Zero); 160workerNodeTelemetryData.TasksExecutionData[(TaskOrTargetTelemetryKey)"Microsoft.Build.Tasks.CreateItem"].CumulativeExecutionTime.ShouldBeGreaterThan(TimeSpan.Zero); 163workerNodeTelemetryData.TasksExecutionData[new TaskOrTargetTelemetryKey("Task01", true, false)].CumulativeExecutionTime.ShouldBeGreaterThan(TimeSpan.Zero); 166workerNodeTelemetryData.TasksExecutionData[new TaskOrTargetTelemetryKey("Task02", true, false)].CumulativeExecutionTime.ShouldBe(TimeSpan.Zero); 169.Count(v => v.CumulativeExecutionTime > TimeSpan.Zero || v.ExecutionsCount > 0).ShouldBe(3);
Microsoft.Build.Framework (1)
Telemetry\TaskExecutionStats.cs (1)
14: this(TimeSpan.Zero, 0, 0)
Microsoft.Build.Framework.UnitTests (1)
WorkerNodeTelemetryEventArgs_Tests.cs (1)
22{ (TaskOrTargetTelemetryKey)"task2", new TaskExecutionStats(TimeSpan.Zero, 0, 0) },
Microsoft.CodeAnalysis (23)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1540return TimeSpan.Zero;
DiagnosticAnalyzer\AnalyzerTelemetry.cs (1)
130public TimeSpan ExecutionTime { get; set; } = TimeSpan.Zero;
SourceGeneration\GeneratorDriver.cs (3)
40_state = new GeneratorDriverState(parseOptions, optionsProvider, generators, incrementalGenerators, additionalTexts, ImmutableArray.Create(new GeneratorState[generators.Length]), DriverStateTable.Empty, SyntaxStore.Empty, driverOptions, runtime: TimeSpan.Zero); 218return _state.With(stateTable: DriverStateTable.Empty, runTime: TimeSpan.Zero); 394return generatorState.WithError(e, filtered, runTime ?? TimeSpan.Zero);
SourceGeneration\GeneratorState.cs (2)
30elapsedTime: TimeSpan.Zero); 45elapsedTime: TimeSpan.Zero)
SourceGeneration\Nodes\CombineNode.cs (1)
97bool usedCachedEntry = builder.TryUseCachedEntries(TimeSpan.Zero, stepInputs);
SourceGeneration\Nodes\HostOutputNode.cs (2)
52nodeTable.TryRemoveEntries(TimeSpan.Zero, inputs); 54else if (entry.State != EntryState.Cached || !nodeTable.TryUseCachedEntries(TimeSpan.Zero, inputs))
SourceGeneration\Nodes\InputNode.cs (1)
133tableBuilder.AddEntry(input, EntryState.Added, TimeSpan.Zero, stepInputs: default, EntryState.Added);
SourceGeneration\Nodes\NodeStateTable.cs (1)
194bool usedCachedEntry = builder.TryUseCachedEntries(TimeSpan.Zero, inputs);
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (4)
72if (_filterTable.TryRemoveEntries(TimeSpan.Zero, noInputStepsStepInfo, out var removedNodes)) 75_transformTable.TryRemoveEntries(TimeSpan.Zero, noInputStepsStepInfo); 83if (state != EntryState.Cached || !_filterTable.TryUseCachedEntries(TimeSpan.Zero, noInputStepsStepInfo, out NodeStateTable<SyntaxNode>.TableEntry entry)) 99_transformTable.TryRemoveEntries(TimeSpan.Zero, noInputStepsStepInfo);
SourceGeneration\Nodes\SourceOutputNode.cs (2)
60tableBuilder.TryRemoveEntries(TimeSpan.Zero, inputs); 62else if (entry.State != EntryState.Cached || !tableBuilder.TryUseCachedEntries(TimeSpan.Zero, inputs))
SourceGeneration\Nodes\TransformNode.cs (2)
74tableBuilder.TryRemoveEntries(TimeSpan.Zero, inputs); 76else if (entry.State != EntryState.Cached || !tableBuilder.TryUseCachedEntries(TimeSpan.Zero, inputs))
SourceGeneration\SyntaxStore.cs (3)
74_syntaxTimes[node] = TimeSpan.Zero; 81_syntaxTimes[syntaxInputNode] = TimeSpan.Zero; 160TimeSpan result = TimeSpan.Zero;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (69)
SourceGeneration\GeneratorDriverTests.cs (12)
571Assert.Equal(TimeSpan.Zero, result.ElapsedTime); 3529Assert.Equal(TimeSpan.Zero, timing.ElapsedTime); 3533Assert.Equal(TimeSpan.Zero, generatorTiming.ElapsedTime); 3559Assert.NotEqual(TimeSpan.Zero, timing.ElapsedTime); 3563Assert.NotEqual(TimeSpan.Zero, generatorTiming.ElapsedTime); 3599Assert.NotEqual(TimeSpan.Zero, timing.ElapsedTime); 3604Assert.NotEqual(TimeSpan.Zero, timing1.ElapsedTime); 3609Assert.NotEqual(TimeSpan.Zero, timing2.ElapsedTime); 3639Assert.NotEqual(TimeSpan.Zero, timing.ElapsedTime); 3643Assert.NotEqual(TimeSpan.Zero, generatorTiming.ElapsedTime); 3650Assert.NotEqual(TimeSpan.Zero, timing2.ElapsedTime); 3655Assert.NotEqual(TimeSpan.Zero, generatorTiming2.ElapsedTime);
SourceGeneration\StateTableTests.cs (54)
25builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 26builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 27builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 38builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 39builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 40builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 53builder.AddEntries(ImmutableArray.Create(o, o, o), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 66builder.AddEntry(o, EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 67builder.AddEntry(null, EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 68builder.AddEntry(o, EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 79builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 80builder.AddEntries(ImmutableArray.Create(2, 3), EntryState.Cached, TimeSpan.Zero, default, EntryState.Cached); 81builder.AddEntries(ImmutableArray.Create(4, 5), EntryState.Modified, TimeSpan.Zero, default, EntryState.Modified); 82builder.AddEntries(ImmutableArray.Create(6), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 86builder.TryModifyEntries(ImmutableArray.Create(10, 11), TimeSpan.Zero, default, EntryState.Modified); 87builder.TryUseCachedEntries(TimeSpan.Zero, default, out var cachedEntries); // ((2, EntryState.Cached), (3, EntryState.Cached)) 88builder.TryModifyEntries(ImmutableArray.Create(20, 21, 22), TimeSpan.Zero, default, EntryState.Modified); 89bool didRemoveEntries = builder.TryRemoveEntries(TimeSpan.Zero, default, out var removedEntries); //((6, EntryState.Removed)) 110builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 111builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Removed, TimeSpan.Zero, default, EntryState.Removed); 112builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 127builder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 128builder.AddEntries(ImmutableArray.Create(4, 5, 6), EntryState.Removed, TimeSpan.Zero, default, EntryState.Removed); 129builder.AddEntries(ImmutableArray.Create(7, 8, 9), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 148builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 158builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 166bool didRemoveEntries = builder.TryRemoveEntries(TimeSpan.Zero, default); 169builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 180builder.AddEntries(ImmutableArray.Create(1, 2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 181builder.AddEntries(ImmutableArray<int>.Empty, EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 182builder.AddEntries(ImmutableArray.Create(3, 4), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 189Assert.True(builder.TryModifyEntries(ImmutableArray.Create(3, 2), TimeSpan.Zero, default, EntryState.Modified)); 190Assert.True(builder.TryModifyEntries(ImmutableArray<int>.Empty, TimeSpan.Zero, default, EntryState.Modified)); 191Assert.True(builder.TryModifyEntries(ImmutableArray.Create(3, 5), TimeSpan.Zero, default, EntryState.Modified)); 203builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 204builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 205builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 206builder.AddEntries(ImmutableArray.Create(4), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 213Assert.True(builder.TryModifyEntry(1, TimeSpan.Zero, default, EntryState.Modified)); 214Assert.True(builder.TryModifyEntry(2, TimeSpan.Zero, default, EntryState.Modified)); 215Assert.True(builder.TryModifyEntry(5, TimeSpan.Zero, default, EntryState.Modified)); 216Assert.True(builder.TryModifyEntry(4, TimeSpan.Zero, default, EntryState.Modified)); 228builder.AddEntries(ImmutableArray.Create(1), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 229builder.AddEntries(ImmutableArray.Create(2), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 230builder.AddEntries(ImmutableArray.Create(3), EntryState.Added, TimeSpan.Zero, default, EntryState.Added); 237Assert.True(builder.TryModifyEntry(1, TimeSpan.Zero, default, EntryState.Modified)); // ((1, EntryState.Cached)) 238Assert.True(builder.TryModifyEntry(4, TimeSpan.Zero, default, EntryState.Modified)); // ((4, EntryState.Modified)) 239Assert.True(builder.TryModifyEntry(5, TimeSpan.Zero, default, EntryState.Modified)); // ((3, EntryState.Cached)) 282nodeBuilder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Cached, TimeSpan.Zero, default, EntryState.Cached); 311nodeBuilder.AddEntries(ImmutableArray.Create(1, 2, 3), EntryState.Added, TimeSpan.Zero, emptyInputSteps, EntryState.Added); 312nodeBuilder.AddEntries(ImmutableArray.Create(4), EntryState.Removed, TimeSpan.Zero, emptyInputSteps, EntryState.Removed); 313nodeBuilder.AddEntries(ImmutableArray.Create(5, 6), EntryState.Modified, TimeSpan.Zero, emptyInputSteps, EntryState.Modified); 600builder.AddEntry(value, state, TimeSpan.Zero, default, state); 1357runtime: TimeSpan.Zero);
SourceGeneration\SyntaxAwareGeneratorTests.cs (3)
2101Assert.NotEqual(TimeSpan.Zero, timing.ElapsedTime); 2107Assert.NotEqual(TimeSpan.Zero, timing1.ElapsedTime); 2114Assert.NotEqual(TimeSpan.Zero, timing2.ElapsedTime);
Microsoft.CodeAnalysis.EditorFeatures (5)
GoOrFind\AbstractGoOrFindNavigationService.cs (1)
212: TimeSpan.Zero;
Interactive\InteractiveSession.cs (1)
88TimeSpan.Zero,
Lightup\ISmartRenameSessionWrapper.cs (1)
49s_automaticFetchDelayAccessor = LightupHelpers.CreatePropertyAccessor<object, TimeSpan>(s_wrappedType, nameof(AutomaticFetchDelay), TimeSpan.Zero);
Remote\SolutionChecksumUpdater.cs (1)
67TimeSpan.Zero,
src\Workspaces\Remote\ServiceHub\Services\EditAndContinue\EditAndContinueLogReporter.cs (1)
33delay: TimeSpan.Zero,
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditSessionTelemetry.cs (1)
70_emitDifferenceTime = TimeSpan.Zero;
ExternalAccess\UnitTesting\Notification\AbstractGlobalOperationNotificationService.cs (1)
33TimeSpan.Zero,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
51TimeSpan.Zero,
SemanticSearch\AbstractSemanticSearchService.cs (1)
158var executionTime = TimeSpan.Zero;
SemanticSearch\QueryExecutionContext.cs (1)
126var executionTime = TimeSpan.Zero;
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\EditAndContinue\EditAndContinueLogReporter.cs (1)
33delay: TimeSpan.Zero,
Microsoft.CodeAnalysis.Workspaces (3)
Shared\TestHooks\AsynchronousOperationListener.cs (1)
169_expeditedDelayCancellationTokenSource.CancelAfter(TimeSpan.Zero);
Workspace\Solution\VersionSource\RecoverableTextAndVersion.RecoverableText.cs (1)
29new(TimeSpan.Zero,
Workspace\Workspace.cs (1)
85TimeSpan.Zero,
Microsoft.DotNet.Build.Tasks.Installers (1)
src\RpmBuilder.cs (1)
181private static readonly DateTimeOffset UnixEpoch = new(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
Microsoft.DotNet.XUnitAssert.Tests (17)
EqualityAssertsTests.cs (12)
1812 var expected = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1813 var actual = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1826 var expected = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1827 var actual = new DateTimeOffset(2023, 2, 11, 15, 5, 0, TimeSpan.Zero); 1846 var expected = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1859 var expected = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1879 var date1 = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1880 var date2 = new DateTimeOffset(2023, 2, 11, 15, 5, 0, TimeSpan.Zero); 1894 var date1 = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1895 var date2 = new DateTimeOffset(2023, 2, 11, 15, 6, 0, TimeSpan.Zero); 1928 var date1 = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero); 1943 var date1 = new DateTimeOffset(2023, 2, 11, 15, 4, 0, TimeSpan.Zero);
EquivalenceAssertsTests.cs (4)
1503 var expected = new DateTimeOffset(2022, 12, 1, 1, 3, 1, TimeSpan.Zero); 1504 var actual = new DateTimeOffset(2022, 12, 1, 1, 3, 1, TimeSpan.Zero); 1512 var expected = new DateTimeOffset(2022, 12, 1, 1, 3, 1, TimeSpan.Zero); 1513 var actual = new DateTimeOffset(2011, 9, 13, 18, 22, 0, TimeSpan.Zero);
Sdk\ArgumentFormatterTests.cs (1)
477 MyProp3 = new DateTimeOffset(2014, 04, 17, 07, 45, 23, TimeSpan.Zero);
Microsoft.Extensions.AI.Abstractions.Tests (14)
ChatCompletion\ChatResponseTests.cs (6)
61response.CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero); 62Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), response.CreatedAt); 91CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), 108Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), result.CreatedAt); 135CreatedAt = new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), 148Assert.Equal(new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), update0.CreatedAt);
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (3)
31new(ChatRole.Assistant, "Hello") { ResponseId = "someResponse", MessageId = "12345", CreatedAt = new DateTimeOffset(1, 2, 3, 4, 5, 6, TimeSpan.Zero), ModelId = "model123" }, 33new(null, "world!") { CreatedAt = new DateTimeOffset(2, 2, 3, 4, 5, 6, TimeSpan.Zero), ConversationId = "123", AdditionalProperties = new() { ["c"] = "d" } }, 49Assert.Equal(new DateTimeOffset(2, 2, 3, 4, 5, 6, TimeSpan.Zero), response.CreatedAt);
ChatCompletion\ChatResponseUpdateTests.cs (4)
76update.CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero); 77Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), update.CreatedAt); 130CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), 161Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), result.CreatedAt);
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
88Value: new(new DateTime(2021, 1, 1), TimeSpan.Zero),
Microsoft.Extensions.AI.OpenAI (2)
src\Shared\ServerSentEvents\SseFormatter.cs (1)
129Debug.Assert(retry >= TimeSpan.Zero);
src\Shared\ServerSentEvents\SseItem.cs (1)
72if (value < TimeSpan.Zero)
Microsoft.Extensions.Caching.Abstractions (4)
DistributedCacheEntryOptions.cs (2)
38if (value <= TimeSpan.Zero) 59if (value <= TimeSpan.Zero)
MemoryCacheEntryOptions.cs (2)
48if (value <= TimeSpan.Zero) 72if (value <= TimeSpan.Zero)
Microsoft.Extensions.Caching.Hybrid (1)
Internal\HybridCachePayload.cs (1)
187remainingTime = TimeSpan.Zero;
Microsoft.Extensions.Caching.SqlServer (1)
SqlServerCache.cs (1)
51if (cacheOptions.DefaultSlidingExpiration <= TimeSpan.Zero)
Microsoft.Extensions.Caching.SqlServer.Tests (2)
SqlServerCacheWithDatabaseTest.cs (1)
390var expectedAbsoluteExpiration = new DateTimeOffset(2025, 1, 1, 1, 0, 0, TimeSpan.Zero);
TestClock.cs (1)
18UtcNow = new DateTimeOffset(2013, 1, 1, 1, 0, 0, offset: TimeSpan.Zero);
Microsoft.Extensions.Caching.StackExchangeRedis (2)
RedisCache.cs (2)
71return ticks == 0 ? DateTimeOffset.MinValue : new DateTimeOffset(ticks, TimeSpan.Zero); 510absoluteExpiration = new DateTimeOffset(absoluteExpirationTicks.Value, TimeSpan.Zero);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (8)
TimeExpirationAsyncTests.cs (4)
114await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.Zero)); 118TimeSpan.Zero); 176await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.Zero)); 180TimeSpan.Zero);
TimeExpirationTests.cs (4)
98cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.Zero)); 102TimeSpan.Zero); 161cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.Zero)); 165TimeSpan.Zero);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
99if (registration.Timeout > TimeSpan.Zero)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (3)
HealthCheckRegistration.cs (3)
61if (timeout <= TimeSpan.Zero && timeout != System.Threading.Timeout.InfiniteTimeSpan) 113if (timeout <= TimeSpan.Zero && timeout != System.Threading.Timeout.InfiniteTimeSpan) 152if (value <= TimeSpan.Zero && value != System.Threading.Timeout.InfiniteTimeSpan)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherTests.cs (2)
159var entry = new HealthReportEntry(status, $"desc{index}", TimeSpan.Zero, null, null); 164return new HealthReport(healthStatusRecords, TimeSpan.Zero);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
HealthCheckPublisherHostedServiceTest.cs (1)
519options.Delay = TimeSpan.Zero;
Microsoft.Extensions.Diagnostics.Probes.Tests (2)
MockHealthCheckService.cs (2)
25HealthReportEntry entry = new HealthReportEntry(healthStatus, null, TimeSpan.Zero, null, null); 27return Task.FromResult(new HealthReport(healthStatusRecords, TimeSpan.Zero));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (8)
IResourceUtilizationTrackerTests.cs (1)
16var utilization = tracker.GetUtilization(TimeSpan.Zero);
Providers\FaultProvider.cs (2)
25return new Snapshot(TimeSpan.FromTicks(_clock.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.Zero, ulong.MaxValue);
ResourceMonitoringServiceTests.cs (2)
389TimeSpan.Zero, 390TimeSpan.Zero,
SnapshotTests.cs (3)
18var snapshot = new Snapshot(TimeSpan.FromTicks(time.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.FromSeconds(1), 10); 22snapshot = new Snapshot(time, TimeSpan.Zero, TimeSpan.FromSeconds(1), 10); 37=> new Snapshot(new FakeTimeProvider(), TimeSpan.Zero, TimeSpan.MinValue, 1000));
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
107_timerFactory = () => NonCapturingTimer.Create(RaiseChangeEvents, state: PollingChangeTokens, dueTime: TimeSpan.Zero, period: DefaultPollingInterval);
Microsoft.Extensions.Hosting.Testing.Tests (5)
FakeHostTests.cs (5)
32x.TimeToLive = TimeSpan.Zero; 48var sut = new FakeHost(hostMock.Object, new FakeHostOptions { StartUpTimeout = TimeSpan.Zero }); 66var sut = new FakeHost(hostMock.Object, new FakeHostOptions { StartUpTimeout = TimeSpan.Zero }); 108var sut = new FakeHost(hostMock.Object, new FakeHostOptions { ShutDownTimeout = TimeSpan.Zero }); 125var sut = new FakeHost(hostMock.Object, new FakeHostOptions { StartUpTimeout = TimeSpan.Zero });
Microsoft.Extensions.Http (1)
DefaultHttpMessageHandlerBuilder.cs (1)
74if (lifetime >= TimeSpan.Zero)
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
71if (readTimeout <= TimeSpan.Zero)
Microsoft.Extensions.Http.Diagnostics.Tests (8)
Logging\HttpClientLoggerTest.cs (3)
984await logger.LogRequestStopAsync(new LogRecord(), httpRequestMessage, httpResponseMessage, TimeSpan.Zero); 1005Assert.Throws<NotSupportedException>(() => logger.LogRequestStop(null, httpRequestMessage, httpResponseMessage, TimeSpan.Zero)); 1006Assert.Throws<NotSupportedException>(() => logger.LogRequestFailed(null, httpRequestMessage, null, new InvalidOperationException(), TimeSpan.Zero));
Logging\HttpClientLoggingExtensionsTest.cs (2)
209options.BodyReadTimeout = TimeSpan.Zero; 319options.BodyReadTimeout = TimeSpan.Zero;
Logging\HttpResponseBodyReaderTest.cs (2)
210BodyReadTimeout = TimeSpan.Zero 238BodyReadTimeout = TimeSpan.Zero
Logging\LoggingOptionsValidatorTest.cs (1)
34var options = new LoggingOptions { BodyReadTimeout = TimeSpan.Zero };
Microsoft.Extensions.Http.Resilience (3)
Internal\RetryAfterHelper.cs (3)
13/// If not found then it will return <see cref="TimeSpan.Zero" />. 27if (parsed && delay < TimeSpan.Zero) 29delay = TimeSpan.Zero;
Microsoft.Extensions.Http.Resilience.Tests (3)
Internal\RetryAfterHelperTests.cs (1)
65retryAfter.Should().Be(TimeSpan.Zero);
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
128options.Retry.Delay = TimeSpan.Zero;
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
238options.Retry.Delay = TimeSpan.Zero;
Microsoft.Extensions.Logging.AzureAppServices (3)
BatchingLoggerOptions.cs (1)
25if (value <= TimeSpan.Zero)
BatchingLoggerProvider.cs (1)
46if (loggerOptions.FlushPeriod <= TimeSpan.Zero)
BlobLoggerProvider.cs (1)
67new DateTimeOffset(key.Year, key.Month, key.Day, key.Hour, 0, 0, TimeSpan.Zero)));
Microsoft.Extensions.ServiceDiscovery (2)
ServiceEndpointWatcher.cs (2)
244_pollingTimer = _timeProvider.CreateTimer(s_pollingAction, this, _options.RefreshPeriod, TimeSpan.Zero); 248_pollingTimer.Change(_options.RefreshPeriod, TimeSpan.Zero);
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsServiceEndpointProviderBase.cs (2)
118validityPeriod = TimeSpan.Zero; 122if (validityPeriod <= TimeSpan.Zero)
Resolver\DnsResolver.cs (1)
44ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(options.Timeout, TimeSpan.Zero);
Microsoft.Extensions.Telemetry.Tests (1)
Logging\ExtendedLoggerTests.cs (1)
994options.AutoFlushDuration = TimeSpan.Zero;
Microsoft.Extensions.TimeProvider.Testing (5)
FakeTimeProvider.cs (4)
21private DateTimeOffset _now = new(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero); 62/// This defaults to <see cref="TimeSpan.Zero"/>. 64/// <exception cref="ArgumentOutOfRangeException">The time value is less than <see cref="TimeSpan.Zero"/>.</exception> 126/// <exception cref="ArgumentOutOfRangeException">The time value is less than <see cref="TimeSpan.Zero"/>.</exception>
Timer.cs (1)
64period = TimeSpan.Zero;
Microsoft.Extensions.TimeProvider.Testing.Tests (26)
FakeTimeProviderTests.cs (20)
30Assert.Equal(TimeSpan.Zero, now.Offset); 32Assert.Equal(TimeSpan.Zero, timeProvider.AutoAdvanceAmount); 46var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero); 52Assert.Equal(nowOffset, new DateTimeOffset(timestamp1, TimeSpan.Zero)); 53Assert.Equal(nowOffset, new DateTimeOffset(timestamp2, TimeSpan.Zero)); 60var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero); 69Assert.Equal(nowOffset, new DateTimeOffset(timestamp1, TimeSpan.Zero)); 70Assert.Equal(nowOffset.AddMilliseconds(msToElapse), new DateTimeOffset(timestamp2, TimeSpan.Zero)); 103var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero)); 116Assert.Equal(TimeSpan.Zero, now.Offset); 119Assert.Equal(TimeSpan.Zero, timeProvider.AutoAdvanceAmount); 162var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero)); 186var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero)); 232}, null, TimeSpan.FromSeconds(1), TimeSpan.Zero); 259}, null, TimeSpan.FromSeconds(1), TimeSpan.Zero); 280var dto = new DateTimeOffset(new DateTime(2022, 1, 2, 3, 4, 5, 6), TimeSpan.Zero); 292var t = timeProvider.Delay(TimeSpan.Zero, CancellationToken.None); 478timeProvider.AutoAdvanceAmount = TimeSpan.Zero; 494}, null, TimeSpan.Zero, oneSecond); 505using var timer = provider.CreateTimer(calls.Add, "timer-1", TimeSpan.FromSeconds(3), TimeSpan.Zero);
TimerTests.cs (6)
25using var timer = timeProvider.CreateTimer(_ => { counter++; }, null, TimeSpan.FromMilliseconds(10), TimeSpan.Zero); 69using var timer = timeProvider.CreateTimer(_ => { counter++; }, null, TimeSpan.Zero, Timeout.InfiniteTimeSpan); 113var timer = timeProvider.CreateTimer(_ => { counter++; }, null, TimeSpan.Zero, TimeSpan.FromMilliseconds(10)); 253using var timer = timeProvider.CreateTimer(_ => { callbackTime = timeProvider.GetUtcNow(); }, null, TimeSpan.Zero, TimeSpan.FromMilliseconds(10)); 276var timer = timeProvider.CreateTimer(_ => { callbackTimes.Add(timeProvider.GetUtcNow()); }, null, TimeSpan.Zero, period); 339timers.Add(timeProvider.CreateTimer(index => triggers[(int)index!] = true, i, TimeSpan.FromSeconds(dueTimes[i]), TimeSpan.Zero));
Microsoft.Maui.Essentials (4)
Geolocation\GeolocationRequest.shared.cs (2)
56 Timeout = TimeSpan.Zero; 66 Timeout = TimeSpan.Zero;
Types\Shared\Utils.shared.cs (1)
27 if (timeout > TimeSpan.Zero)
Vibration\Vibration.shared.cs (1)
113 duration = TimeSpan.Zero;
Microsoft.Net.Http.Headers.Tests (25)
DateParserTest.cs (6)
20yield return new object[] { "Tue, 15 Nov 1994 08:12:31 GMT", new DateTimeOffset(1994, 11, 15, 8, 12, 31, TimeSpan.Zero) }; 21yield return new object[] { " Sunday, 06-Nov-94 08:49:37 GMT ", new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero) }; 22yield return new object[] { " Tue,\r\n 15 Nov\r\n 1994 08:12:31 GMT ", new DateTimeOffset(1994, 11, 15, 8, 12, 31, TimeSpan.Zero) }; 23yield return new object[] { "Sat, 09-Dec-2017 07:07:03 GMT ", new DateTimeOffset(2017, 12, 09, 7, 7, 3, TimeSpan.Zero) }; 46HeaderUtilities.FormatDate(new DateTimeOffset(2010, 7, 31, 15, 38, 57, TimeSpan.Zero))); 49HeaderUtilities.FormatDate(new DateTimeOffset(2010, 1, 1, 1, 1, 1, TimeSpan.Zero)));
RangeConditionHeaderValueTest.cs (12)
33new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 35Assert.Equal(new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero), rangeCondition.LastModified); 44rangeCondition = new RangeConditionHeaderValue(new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 54new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 56new DateTimeOffset(2008, 8, 16, 13, 44, 10, TimeSpan.Zero)); 58new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 75new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 77new DateTimeOffset(2008, 8, 16, 13, 44, 10, TimeSpan.Zero)); 79new DateTimeOffset(2010, 7, 15, 12, 33, 57, TimeSpan.Zero)); 97new RangeConditionHeaderValue(new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero))); 99new RangeConditionHeaderValue(new DateTimeOffset(1994, 11, 9, 8, 49, 37, TimeSpan.Zero))); 128new RangeConditionHeaderValue(new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero)));
SetCookieHeaderValueTest.cs (7)
18Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 44Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 135Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 159Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 238Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 259Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero), 271Expires = new DateTimeOffset(1994, 11, 6, 8, 49, 37, TimeSpan.Zero),
Microsoft.VisualStudio.LanguageServices (1)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
77TimeSpan.Zero,
Microsoft.VisualStudio.LanguageServices.CSharp (1)
SemanticSearch\SemanticSearchQueryExecutor.cs (1)
66var emitTime = TimeSpan.Zero;
PresentationCore (165)
System\Windows\Duration.cs (2)
25if (timeSpan < TimeSpan.Zero) 61if (timeSpan < TimeSpan.Zero)
System\Windows\Media\Animation\Clock.cs (37)
120_nextTickNeededTime = TimeSpan.Zero; 488return _currentTime ?? TimeSpan.Zero; 525return TimeSpan.Zero; 606if (!_resolvedDuration.HasTimeSpan || _resolvedDuration.TimeSpan > TimeSpan.Zero) 757InternalSeek(TimeSpan.Zero); 1919TimeSpan nextDesiredTick = InternalNextTickNeededTime == TimeSpan.Zero ? _rootData.CurrentAdjustedGlobalTime 1956if (_currentDuration.TimeSpan == TimeSpan.Zero) // We must be post-filling if we have gotten here 1961localProgress = TimeSpan.Zero; 1964_currentTime = TimeSpan.Zero; 2091if ((localProgress == TimeSpan.Zero) 2115if (localProgress == TimeSpan.Zero) 2122InternalNextTickNeededTime = TimeSpan.Zero; 2140if (localProgress == TimeSpan.Zero) // We are currently exactly at a boundary 2292InternalNextTickNeededTime = TimeSpan.Zero; // We need ticks immediately 2340Debug.Assert(_currentDuration.TimeSpan > TimeSpan.Zero, "ComputeCurrentTime was entered with _currentDuration <= 0"); 2376InternalNextTickNeededTime = TimeSpan.Zero; 2400InternalNextTickNeededTime = TimeSpan.Zero; 2478if (_currentDuration.HasTimeSpan && _currentDuration.TimeSpan == TimeSpan.Zero) 2481effectiveDuration = TimeSpan.Zero; 2487effectiveDuration = TimeSpan.Zero; 2511TimeSpan previousIterationDuration = TimeSpan.Zero; 2579postFillDuration = TimeSpan.Zero; // There is no reachable postfill zone because the active period is infinite 2615else if (postFillDuration != TimeSpan.Zero && // Our active period is finite and we have fill behavior 3000InternalNextTickNeededTime = IsInteractivelyPaused ? TimeSpan.Zero : (TimeSpan?)null; 3026if (timeUntilBegin >= TimeSpan.Zero) 3035if (timeUntilExpiration >= TimeSpan.Zero && 3081InternalNextTickNeededTime = TimeSpan.Zero; // When TimeManager wakes up, we will need an update 3211_syncData.PreviousRepeatTime = TimeSpan.Zero; 3263_syncData.PreviousSyncClockTime = TimeSpan.Zero; 3264_syncData.PreviousRepeatTime = TimeSpan.Zero; 3311if (syncElapsedTimeST > TimeSpan.Zero) // Only store the last value if it is greater than 3322_syncData.PreviousRepeatTime = TimeSpan.Zero; 3334_syncData.PreviousSyncClockTime = TimeSpan.Zero; 3344syncElapsedTimeST = TimeSpan.Zero; 3682subtree.Current.InternalNextTickNeededTime = TimeSpan.Zero; 3686while (current != null && current.InternalNextTickNeededTime != TimeSpan.Zero) 3688current.InternalNextTickNeededTime = TimeSpan.Zero;
System\Windows\Media\Animation\ClockController.cs (2)
177if (offset < TimeSpan.Zero) 219if (offset < TimeSpan.Zero)
System\Windows\Media\Animation\ClockGroup.cs (2)
138if ((!duration.HasTimeSpan || duration.TimeSpan > TimeSpan.Zero) 338Duration currentDuration = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (4)
553TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 621TimeSpan calculationDuration = TimeSpan.Zero; 692_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 751TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (4)
553TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 621TimeSpan calculationDuration = TimeSpan.Zero; 692_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 751TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (4)
553TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 621TimeSpan calculationDuration = TimeSpan.Zero; 692_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 751TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (4)
553TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 621TimeSpan calculationDuration = TimeSpan.Zero; 692_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 751TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (4)
553TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 621TimeSpan calculationDuration = TimeSpan.Zero; 692_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 751TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\KeyTime.cs (1)
48if (timeSpan < TimeSpan.Zero)
System\Windows\Media\Animation\ParallelTimeline.cs (1)
85Duration simpleDuration = TimeSpan.Zero;
System\Windows\Media\Animation\RepeatBehavior.cs (2)
41_repeatDuration = TimeSpan.Zero; 53if (duration < TimeSpan.Zero)
System\Windows\Media\Animation\TimeIntervalCollection.cs (16)
266if (slipTime == TimeSpan.Zero) // The no-op case 859|| (period == TimeSpan.Zero) // The PTIC has no nonzero period, we define such intersections nonexistent 986|| (period == TimeSpan.Zero) // The PTIC has no nonzero period, we define such intersections nonexistent 1036Debug.Assert(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || beginTime == endTime); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime 1161Debug.Assert(endTime.HasValue || fillDuration == TimeSpan.Zero); // Either endTime is finite, or it's infinite hence we cannot have any fill zone 1162Debug.Assert(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || (endTime.HasValue && beginTime == endTime)); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime 1175&& _nodeIsPoint[_count - 1] && (endTime > beginTime || fillDuration.TimeSpan > TimeSpan.Zero)))); // ...we may have a point intersection with the stopped zone 1181projection.InitializePoint(TimeSpan.Zero); 1185bool includeFillPeriod = !fillDuration.HasTimeSpan || fillDuration.TimeSpan > TimeSpan.Zero; // This variable represents whether we have a non-zero fill zone 1256projection.CurrentNodeTime = TimeSpan.Zero; 1312Debug.Assert(CurrentNodeTime >= TimeSpan.Zero); // Verify that we are already clipped 1440projection.MergeInterval(TimeSpan.Zero, true, 1457projection.MergeInterval(TimeSpan.Zero, true, 1499projection._nodeTime[0] = TimeSpan.Zero; 1517projection.MergeInterval(TimeSpan.Zero, true, 1528projection.MergePoint(TimeSpan.Zero);
System\Windows\Media\Animation\Timeline.cs (1)
275(TimeSpan?)TimeSpan.Zero,
System\Windows\Media\Animation\TimeManager.cs (7)
215if (GetNextTickNeeded() >= TimeSpan.Zero) 296_lastTickTime = TimeSpan.Zero; 300_globalTime = TimeSpan.Zero; 551return TimeSpan.Zero; 576return TimeSpan.Zero; 768if (nextTickNeededTimeFromCurrentTime <= TimeSpan.Zero) 772return TimeSpan.Zero;
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
588AcquireBackBuffer(TimeSpan.Zero, false);
System\Windows\Media\mediaclock.cs (1)
124TimeSpan currentTimeValue = currentTimeProperty ?? TimeSpan.Zero;
System\Windows\Media\MediaContext.cs (7)
548TimeSpan nextTickNeeded = TimeSpan.Zero; 564if (nextTickNeeded >= TimeSpan.Zero) 586else if (nextTickNeeded > TimeSpan.Zero) 601else if (nextTickNeeded == TimeSpan.Zero) 714TimeSpan presentationDelay = TimeSpan.Zero; 1886ScheduleNextRenderOp(TimeSpan.Zero); 2545ScheduleNextRenderOp(TimeSpan.Zero);
System\Windows\Media\MediaPlayerState.cs (1)
658SetPosition(TimeSpan.Zero);
PresentationCore.Tests (2)
System\Windows\Media\Animation\RepeatBehavior.Tests.cs (2)
80yield return new object[] { TimeSpan.Zero }; 182yield return new object[] { RepeatBehavior.Forever, new RepeatBehavior(TimeSpan.Zero), false };
PresentationFramework (10)
System\Windows\Controls\Primitives\Popup.cs (1)
1690_asyncDestroy.Interval = animating ? AnimationDelayTime : TimeSpan.Zero;
System\Windows\Controls\ProgressBar.cs (1)
243startTime = TimeSpan.Zero;
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (4)
645TimeSpan largestTimeSpanKeyTime = TimeSpan.Zero; 713TimeSpan calculationDuration = TimeSpan.Zero; 784_sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero; 843TimeSpan blockBeginTime = TimeSpan.Zero;
System\Windows\Media\Animation\SeekStoryboard.cs (2)
52return !(TimeSpan.Zero.Equals(_offset)); 104private TimeSpan _offset = TimeSpan.Zero;
System\Windows\VisualStateManager.cs (2)
372dynamic.Duration = new Duration(TimeSpan.Zero); 780private static readonly Duration DurationZero = new Duration(TimeSpan.Zero);
PresentationFramework.Aero (1)
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (1)
89BeginTime = TimeSpan.Zero,
PresentationFramework.Aero2 (1)
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (1)
89BeginTime = TimeSpan.Zero,
RunTests (1)
AssemblyScheduler.cs (1)
264.Select(group => new TypeInfo(GetName(group.Key), group.Key, group.Select(test => new TestMethodInfo(GetName(test), test, TimeSpan.Zero)).ToImmutableArray()))
ScenarioTests.Common.Tests (2)
ScenarioTestTypes.cs (2)
1118if (StreamDuration != TimeSpan.Zero) 1145if (ReadThrottle != TimeSpan.Zero)
Shared (2)
ServerSentEvents\SseFormatter.cs (1)
129Debug.Assert(retry >= TimeSpan.Zero);
ServerSentEvents\SseItem.cs (1)
72if (value < TimeSpan.Zero)
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
88Value: new(new DateTime(2021, 1, 1), TimeSpan.Zero),
System.Configuration.ConfigurationManager (1)
System\Configuration\PositiveTimeSpanValidator.cs (1)
17if ((TimeSpan)value <= TimeSpan.Zero)
System.Data.Common (1)
System\Data\Common\TimeSpanStorage.cs (1)
12private static readonly TimeSpan s_defaultValue = TimeSpan.Zero;
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\Activity.cs (2)
208/// <see cref="TimeSpan.Zero"/>. 857if (Duration == TimeSpan.Zero)
System\Diagnostics\DiagnosticSourceActivity.cs (1)
57if (activity.Duration == TimeSpan.Zero)
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (2)
274timeOffset = TimeSpan.Zero; 348TimeSpan fractionSpan = TimeSpan.Zero;
System.Formats.Tar (2)
System\Formats\Tar\TarHelpers.cs (2)
138new DateTimeOffset((secondsSinceUnixEpoch * TimeSpan.TicksPerSecond) + DateTime.UnixEpoch.Ticks, TimeSpan.Zero); 142new DateTimeOffset((long)(secondsSinceUnixEpoch * TimeSpan.TicksPerSecond) + DateTime.UnixEpoch.Ticks, TimeSpan.Zero);
System.IO.IsolatedStorage (3)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (3)
247return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime(); 263return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime(); 279return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
System.Net.Http (14)
System\Net\Http\Headers\AltSvcHeaderValue.cs (1)
18public static AltSvcHeaderValue Clear { get; } = new AltSvcHeaderValue(ClearString, host: null, port: 0, maxAge: TimeSpan.Zero, persist: false);
System\Net\Http\HttpClient.cs (1)
107ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(value, TimeSpan.Zero);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
504if (drainTime == TimeSpan.Zero)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
883return lifetime == TimeSpan.Zero || connection.GetLifetimeTicks(Environment.TickCount64) > lifetime.TotalMilliseconds;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
704if (authorityMaxAge <= TimeSpan.Zero)
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
216if (drainTime == TimeSpan.Zero)
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
99if (rtt > TimeSpan.Zero && _streamWindowSize < MaxStreamWindowSize)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (2)
76(settings._pooledConnectionIdleTimeout == TimeSpan.Zero || 77settings._pooledConnectionLifetime == TimeSpan.Zero) &&
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (5)
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) ||
System.Net.HttpListener (5)
System\Net\Managed\HttpListenerTimeoutManager.Managed.cs (5)
10private TimeSpan _drainEntityBody = TimeSpan.Zero; 11private TimeSpan _idleConnection = TimeSpan.Zero; 41get => TimeSpan.Zero; 52get => TimeSpan.Zero; 75get => TimeSpan.Zero;
System.Net.Mail (4)
System\Net\Mime\SmtpDateTime.cs (4)
65{ "UT", TimeSpan.Zero }, // +0000 66{ "GMT", TimeSpan.Zero }, // +0000 116_timeZone = TimeSpan.Zero; 300timeZone = TimeSpan.Zero;
System.Net.Quic (11)
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
147if (options.IdleTimeout != TimeSpan.Zero) 155if (options.KeepAliveInterval != TimeSpan.Zero) 175if (options.HandshakeTimeout != TimeSpan.Zero)
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 (4)
93/// Default <see cref="TimeSpan.Zero"/> means underlying implementation default idle timeout. 95public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero; 129/// Value <see cref="TimeSpan.Zero"/> means underlying implementation default timeout. 137/// Value <see cref="TimeSpan.Zero"/> means underlying implementation default timeout.
System\Net\Quic\QuicStream.Stream.cs (2)
122if (_readTimeout > TimeSpan.Zero) 181if (_writeTimeout > TimeSpan.Zero)
System.Net.Requests (3)
System\Net\HttpWebRequest.cs (3)
1350if (httpRequestCachePolicy.MinFresh > TimeSpan.Zero) 1360if (httpRequestCachePolicy.MaxStale > TimeSpan.Zero) 1370MaxAge = TimeSpan.Zero
System.Net.Security (1)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
50if (downloadTimeout <= TimeSpan.Zero)
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseFormatter.cs (1)
126Debug.Assert(retry >= TimeSpan.Zero);
System\Net\ServerSentEvents\SseItem.cs (1)
63if (value < TimeSpan.Zero)
System.Net.Sockets (1)
System\Net\Sockets\Socket.cs (1)
2441ArgumentOutOfRangeException.ThrowIfLessThan(timeout, TimeSpan.Zero);
System.Net.WebSockets (13)
src\libraries\Common\src\System\Net\WebSockets\WebSocketDefaults.cs (1)
14public static readonly TimeSpan DefaultKeepAliveInterval = TimeSpan.Zero;
System\Net\WebSockets\ManagedWebSocket.cs (4)
146Debug.Assert(keepAliveInterval == Timeout.InfiniteTimeSpan || keepAliveInterval >= TimeSpan.Zero, $"Invalid {nameof(keepAliveInterval)}: {keepAliveInterval}"); 147Debug.Assert(keepAliveTimeout == Timeout.InfiniteTimeSpan || keepAliveTimeout >= TimeSpan.Zero, $"Invalid {nameof(keepAliveTimeout)}: {keepAliveTimeout}"); 169if (keepAliveInterval > TimeSpan.Zero) 172if (keepAliveTimeout > TimeSpan.Zero)
System\Net\WebSockets\WebSocket.cs (2)
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. 42/// The default is <see cref="TimeSpan.Zero"/>. 49if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero) 59/// The timeout to use when waiting for the peer's PONG in response to us sending a PING; or <see cref="TimeSpan.Zero"/> or 68if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero)
System\Net\WebSockets\WebSocketStream.cs (1)
54if (closeTimeout < TimeSpan.Zero && closeTimeout != Timeout.InfiniteTimeSpan)
System.Net.WebSockets.Client (7)
src\libraries\Common\src\System\Net\WebSockets\WebSocketDefaults.cs (1)
14public static readonly TimeSpan DefaultKeepAliveInterval = TimeSpan.Zero;
System\Net\WebSockets\ClientWebSocketOptions.cs (4)
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) 199/// The timeout to use when waiting for the peer's PONG in response to us sending a PING; or <see cref="TimeSpan.Zero"/> or 210if (value != Timeout.InfiniteTimeSpan && value < TimeSpan.Zero)
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
264PooledConnectionLifetime = TimeSpan.Zero, 281handler.PooledConnectionLifetime = TimeSpan.Zero;
System.Private.CoreLib (60)
src\libraries\Common\src\System\Threading\ITimer.cs (1)
16/// Specify <see cref="Timeout.InfiniteTimeSpan"/> to prevent the timer from restarting. Specify <see cref="TimeSpan.Zero"/> to restart the timer immediately.
src\libraries\Common\src\System\TimeProvider.cs (1)
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>
src\libraries\System.Private.CoreLib\src\System\CurrentSystemTimeZone.cs (3)
128TimeSpan delta = TimeSpan.Zero; 134if (rule.DateStart.Year <= year && rule.DateEnd.Year >= year && rule.DaylightDelta != TimeSpan.Zero) 151return TimeSpan.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\IncrementingEventCounter.cs (1)
62payload.DisplayRateTimeScale = (DisplayRateTimeScale == TimeSpan.Zero) ? "" : DisplayRateTimeScale.ToString("c");
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\IncrementingPollingCounter.cs (1)
75payload.DisplayRateTimeScale = (DisplayRateTimeScale == TimeSpan.Zero) ? "" : DisplayRateTimeScale.ToString("c");
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (12)
79offset = TimeSpan.Zero; 149offset = TimeSpan.Zero; 2482offset = TimeSpan.Zero; 2787result.timeZoneOffset = TimeSpan.Zero; 2821result.timeZoneOffset = TimeSpan.Zero; 2859result.timeZoneOffset = TimeSpan.Zero; 2866result.timeZoneOffset = TimeSpan.Zero; 3017result.timeZoneOffset = TimeSpan.Zero; 4303if ((result.flags & ParseFlags.TimeZoneUsed) != 0 && result.timeZoneOffset != TimeSpan.Zero) 4329if ((result.flags & ParseFlags.TimeZoneUsed) != 0 && result.timeZoneOffset != TimeSpan.Zero) 4422result.timeZoneOffset = TimeSpan.Zero; 4486result.timeZoneOffset = TimeSpan.Zero;
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
206if (millisecondsDelay == TimeSpan.Zero)
src\libraries\System.Private.CoreLib\src\System\TimeZone.cs (4)
131return CalculateUtcOffset(time, daylightTimes) != TimeSpan.Zero; 198return TimeSpan.Zero; 203return TimeSpan.Zero; 257return TimeSpan.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (4)
46DaylightDelta != TimeSpan.Zero || 129baseUtcOffsetDelta: TimeSpan.Zero, 216if (dateStart != DateTime.MinValue && dateStart.Kind == DateTimeKind.Unspecified && dateStart.TimeOfDay != TimeSpan.Zero) 221if (dateEnd != DateTime.MaxValue && dateEnd.Kind == DateTimeKind.Unspecified && dateEnd.TimeOfDay != TimeSpan.Zero)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (14)
222if (rule.DaylightDelta > TimeSpan.Zero) 280if (rule.DaylightDelta > TimeSpan.Zero) 789sourceOffset += (sourceIsDaylightSavings ? sourceRule.DaylightDelta : TimeSpan.Zero /*FUTURE: sourceRule.StandardDelta*/); 1402bool invalidAtStart = rule.DaylightDelta > TimeSpan.Zero; 1406daylightTime.Start + (invalidAtStart ? rule.DaylightDelta : TimeSpan.Zero); /* FUTURE: - rule.StandardDelta; */ 1410daylightTime.End + (invalidAtStart ? -rule.DaylightDelta : TimeSpan.Zero); 1703if (rule == null || rule.DaylightDelta == TimeSpan.Zero) 1712if (rule.DaylightDelta > TimeSpan.Zero) 1773if (rule == null || rule.DaylightDelta == TimeSpan.Zero) 1782if (rule.DaylightDelta < TimeSpan.Zero) 1848baseOffset += (isDaylightSavings ? rule.DaylightDelta : TimeSpan.Zero /* FUTURE: rule.StandardDelta */); 1912baseOffset += (isDaylightSavings ? rule.DaylightDelta : TimeSpan.Zero /* FUTURE: rule.StandardDelta */); 2220+ (adjustmentRule.HasDaylightSaving ? adjustmentRule.DaylightDelta : TimeSpan.Zero); 2237return CreateCustomTimeZone(UtcId, TimeSpan.Zero, displayName, standardDisplayName);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.Unix.cs (2)
161string baseOffsetText = string.Create(null, stackalloc char[128], $"(UTC{(baseUtcOffset >= TimeSpan.Zero ? '+' : '-')}{baseUtcOffset:hh\\:mm})"); 189if (baseUtcOffset == TimeSpan.Zero)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (2)
75if (rule.BaseUtcOffsetDelta != TimeSpan.Zero) 435TimeSpan baseUtcOffsetDelta = TimeSpan.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (14)
64_baseUtcOffset = TimeSpan.Zero; 163rule.DaylightDelta == TimeSpan.Zero && rule.BaseUtcOffsetDelta == TimeSpan.Zero) 238string? displayName = string.Create(null, stackalloc char[256], $"(UTC{(_baseUtcOffset >= TimeSpan.Zero ? '+' : '-')}{_baseUtcOffset:hh\\:mm}) {_id}"); 547TimeSpan daylightDelta = transitionType.IsDst ? transitionOffset : TimeSpan.Zero; 548TimeSpan baseUtcDelta = transitionType.IsDst ? TimeSpan.Zero : transitionOffset; 574TimeSpan daylightDelta = startTransitionType.IsDst ? transitionOffset : TimeSpan.Zero; 575TimeSpan baseUtcDelta = startTransitionType.IsDst ? TimeSpan.Zero : transitionOffset; 626TimeSpan daylightDelta = transitionType.IsDst ? transitionOffset : TimeSpan.Zero; 627TimeSpan baseUtcDelta = transitionType.IsDst ? TimeSpan.Zero : transitionOffset; 759TimeSpan.Zero, 820if (timeOffset.GetValueOrDefault() < TimeSpan.Zero) 1268TimeSpan adjustment = TimeSpan.Zero; 1279if (adjustment != TimeSpan.Zero)
System.Private.Windows.Core (2)
System\Value.cs (2)
733DateTimeOffset dto = new(_union.Ticks, TimeSpan.Zero); 895DateTimeOffset? dto = new DateTimeOffset(_union.Ticks, TimeSpan.Zero);
System.Runtime.Caching (5)
System\Runtime\Caching\Configuration\ConfigUtil.cs (1)
69if (!TimeSpan.TryParse(sValue, out tValue) || tValue <= TimeSpan.Zero)
System\Runtime\Caching\MemoryCacheEntry.cs (2)
121if (_slidingExp > TimeSpan.Zero) 290if (_slidingExp > TimeSpan.Zero)
System\Runtime\Caching\MemoryCacheStore.cs (1)
135if (entry.InUsage() || entry.SlidingExp > TimeSpan.Zero)
System\Runtime\Caching\ObjectCache.cs (1)
21public static readonly TimeSpan NoSlidingExpiration = TimeSpan.Zero;
System.Security.Cryptography (4)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
50if (downloadTimeout <= TimeSpan.Zero)
System\Security\Cryptography\X509Certificates\ChainPal.OpenSsl.cs (2)
88if (timeout == TimeSpan.Zero) 93else if (timeout > s_maxUrlRetrievalTimeout || timeout < TimeSpan.Zero)
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (1)
134UrlRetrievalTimeout = TimeSpan.Zero; // default timeout
System.ServiceModel.Federation (4)
System\Runtime\TimeoutHelper.cs (3)
19Contract.Assert(timeout >= TimeSpan.Zero, "timeout must be non-negative"); 121if (remaining <= TimeSpan.Zero) 123return TimeSpan.Zero;
System\ServiceModel\Federation\WsTrustTokenParameters.cs (1)
155set => _maxIssuedTokenCachingTime = value <= TimeSpan.Zero
System.ServiceModel.NetFramingBase (13)
System\ServiceModel\Channels\BufferedConnection.cs (2)
35_pendingTimeout = TimeSpan.Zero; 77_pendingTimeout = TimeSpan.Zero;
System\ServiceModel\Channels\ConnectionPoolHelper.cs (3)
88_connectionPool.ReturnConnection(_connectionKey, localRawConnection, false, TimeSpan.Zero); 144_connectionPool.ReturnConnection(_connectionKey, rawConnection, false, TimeSpan.Zero); 162ReleaseConnection(true, TimeSpan.Zero);
System\ServiceModel\Channels\NetFramingTransportChannelFactory.cs (1)
273ReleaseConnectionPoolAsync(localConnectionPool, TimeSpan.Zero).GetAwaiter().GetResult();
System\ServiceModel\Channels\OutputChannel.cs (3)
33if (timeout < TimeSpan.Zero) 82if (timeout < TimeSpan.Zero) 107if (timeout < TimeSpan.Zero)
System\ServiceModel\Channels\StreamedFramingRequestChannel.cs (1)
261_connectionReader.DoneSending(TimeSpan.Zero);
System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (1)
54await OpenAsync(TimeSpan.Zero);
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (2)
293ReturnConnectionIfNecessary(true, TimeSpan.Zero); 299ReturnConnectionIfNecessary(true, TimeSpan.Zero);
System.ServiceModel.NetNamedPipe (4)
System\Runtime\BackoffTimeoutHelper.cs (2)
95if (_waitTime < TimeSpan.Zero) 97_waitTime = TimeSpan.Zero;
System\ServiceModel\Channels\NamedPipeConnectionPoolSettings.cs (1)
47if (value < TimeSpan.Zero)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (1)
158backoffTimeout = TimeoutHelper.Add(timeout, TimeSpan.Zero - TimeSpan.FromMilliseconds(backoffBufferMilliseconds));
System.ServiceModel.Primitives.Tests (27)
IdentityModel\SecurityTokenProviderTest.cs (27)
23var token = provider.GetToken(TimeSpan.Zero); 26token = provider.RenewToken(TimeSpan.Zero, token); 29provider.CancelToken(TimeSpan.Zero, token); 32var iar = provider.BeginGetToken(TimeSpan.Zero, null, null); 36iar = provider.BeginRenewToken(TimeSpan.Zero, token, null, null); 40iar = provider.BeginCancelToken(TimeSpan.Zero, token, null, null); 44token = provider.GetTokenAsync(TimeSpan.Zero).Result; 47token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 50provider.CancelTokenAsync(TimeSpan.Zero, token).Wait(); 59var token = provider.GetToken(TimeSpan.Zero); 62token = provider.RenewToken(TimeSpan.Zero, token); 65provider.CancelToken(TimeSpan.Zero, token); 68var iar = provider.BeginGetToken(TimeSpan.Zero, null, null); 72iar = provider.BeginRenewToken(TimeSpan.Zero, token, null, null); 76iar = provider.BeginCancelToken(TimeSpan.Zero, token, null, null); 80token = provider.GetTokenAsync(TimeSpan.Zero).Result; 83token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 86provider.CancelTokenAsync(TimeSpan.Zero, token).Wait(); 97var token = provider.GetToken(TimeSpan.Zero); 100token = provider.RenewToken(TimeSpan.Zero, token); 103provider.CancelToken(TimeSpan.Zero, token); 106var iar = provider.BeginGetToken(TimeSpan.Zero, null, null); 110iar = provider.BeginRenewToken(TimeSpan.Zero, token, null, null); 114iar = provider.BeginCancelToken(TimeSpan.Zero, token, null, null); 118token = provider.GetTokenAsync(TimeSpan.Zero).Result; 121token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 124provider.CancelTokenAsync(TimeSpan.Zero, token).Wait();
System.ServiceModel.UnixDomainSocket (7)
System\ServiceModel\Channels\SocketConnection.cs (5)
495if (timeout <= TimeSpan.Zero) 546if (timeout <= TimeSpan.Zero) 590if (oldTimeout < TimeSpan.Zero) // Expired already 661remainingTime <= TimeSpan.Zero) 848if (timeoutHelper.RemainingTime() == TimeSpan.Zero)
System\ServiceModel\Channels\UnixDomainSocketConnectionPoolSettings.cs (2)
45if (value < TimeSpan.Zero) 66if (value < TimeSpan.Zero)
System.Threading.RateLimiting (10)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
239idleDuration = rateLimiter.Value.Value.IdleDuration ?? TimeSpan.Zero;
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
58if (options.Window <= TimeSpan.Zero)
System\Threading\RateLimiting\FixedWindowRateLimiterOptions.cs (2)
13/// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="FixedWindowRateLimiter"/>. 15public TimeSpan Window { get; set; } = TimeSpan.Zero;
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
66if (options.Window <= TimeSpan.Zero)
System\Threading\RateLimiting\SlidingWindowRateLimiterOptions.cs (2)
13/// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="SlidingWindowRateLimiter"/>. 15public TimeSpan Window { get; set; } = TimeSpan.Zero;
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
64if (options.ReplenishmentPeriod <= TimeSpan.Zero)
System\Threading\RateLimiting\TokenBucketRateLimiterOptions.cs (2)
13/// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="TokenBucketRateLimiter"/>. 15public TimeSpan ReplenishmentPeriod { get; set; } = TimeSpan.Zero;
System.Transactions.Local (17)
System\Transactions\TransactionManager.cs (4)
376ArgumentOutOfRangeException.ThrowIfLessThan(value, TimeSpan.Zero); 535ArgumentOutOfRangeException.ThrowIfLessThan(transactionTimeout, TimeSpan.Zero); 537if (MaximumTimeout != TimeSpan.Zero) 539if (transactionTimeout > MaximumTimeout || transactionTimeout == TimeSpan.Zero)
System\Transactions\TransactionScope.cs (10)
134if ((null != _expectedCurrent) && (null == _committableTransaction) && (TimeSpan.Zero != scopeTimeout)) 141TimeSpan.Zero); 220if ((null != _expectedCurrent) && (null == _committableTransaction) && (TimeSpan.Zero != scopeTimeout)) 227TimeSpan.Zero); 302if ((null != _expectedCurrent) && (null == _committableTransaction) && (TimeSpan.Zero != scopeTimeout)) 309TimeSpan.Zero); 366TimeSpan.Zero, 475if (TimeSpan.Zero != scopeTimeout) 481TimeSpan.Zero 1125ArgumentOutOfRangeException.ThrowIfLessThan(scopeTimeout, TimeSpan.Zero, paramName);
System\Transactions\TransactionState.cs (2)
2166newTimeout = TimeSpan.Zero; 2171if (newTimeout <= TimeSpan.Zero)
System\Transactions\TransactionTable.cs (1)
172if (timeout != TimeSpan.Zero)
System.Windows.Forms.UI.IntegrationTests (2)
Infra\ScreenRecordService.cs (2)
172WriteFctl(fileStream, buffer, crc, sequenceNumber: 0, size: new Size(firstFrame.image.Width, firstFrame.image.Height), offset: firstFrame.offset, delay: TimeSpan.Zero, ApngDisposeOp.None, ApngBlendOp.Source); 597var throttle = TimeSpan.Zero;
System.Xaml (1)
System\Windows\Markup\DateTimeValueSerializer.cs (1)
76if (dateTime.TimeOfDay == TimeSpan.Zero)
WindowsBase.Tests (9)
System\Windows\SplashScreenTests.cs (1)
62splashScreen.Close(TimeSpan.Zero);
System\Windows\Threading\DispatcherTimerTests.cs (8)
15Assert.Equal(TimeSpan.Zero, timer.Interval); 35Assert.Equal(TimeSpan.Zero, timer.Interval); 55Assert.Equal(TimeSpan.Zero, timer.Interval); 94Assert.Throws<InvalidEnumArgumentException>("priority", () => new DispatcherTimer(TimeSpan.Zero, priority, (s, e) => {}, Dispatcher.CurrentDispatcher)); 102Assert.Throws<ArgumentException>("priority", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Inactive, (s, e) => {}, Dispatcher.CurrentDispatcher)); 109Assert.Throws<ArgumentNullException>("dispatcher", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Normal, (s, e) => {}, null)); 130Assert.Throws<ArgumentNullException>("callback", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Normal, null, Dispatcher.CurrentDispatcher)); 155yield return new object[] { TimeSpan.Zero };
xunit.assert (4)
EqualityAsserts.cs (4)
508 Equal(expected, actual, TimeSpan.Zero); 528 (precision == TimeSpan.Zero ? "" : string.Format(CultureInfo.CurrentCulture, " (difference {0} is larger than {1})", difference, precision)); 542 Equal(expected, actual, TimeSpan.Zero); 562 (precision == TimeSpan.Zero ? "" : string.Format(CultureInfo.CurrentCulture, " (difference {0} is larger than {1})", difference, precision));