16 references to FromHours
aspire (1)
NuGet\NuGetPackageCache.cs (1)
61entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1);
Aspire.Dashboard (4)
Components\Pages\Metrics.razor.cs (4)
90new() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastHour)], Id = TimeSpan.FromHours(1) }, 91new() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastThreeHours)], Id = TimeSpan.FromHours(3) }, 92new() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastSixHours)], Id = TimeSpan.FromHours(6) }, 93new() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastTwelveHours)], Id = TimeSpan.FromHours(12) },
Aspire.Dashboard.Components.Tests (1)
Shared\TestTimeProvider.cs (1)
25public override TimeZoneInfo LocalTimeZone => _localTimeZone ??= TimeZoneInfo.CreateCustomTimeZone(nameof(TestTimeProvider), TimeSpan.FromHours(1), nameof(TestTimeProvider), nameof(TestTimeProvider));
Aspire.Hosting.Yarp.Tests (1)
YarpConfigGeneratorTests.cs (1)
162Expiration = TimeSpan.FromHours(3),
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingProviderTests.cs (1)
912Assert.InRange(actual, now + TimeSpan.FromHours(24 * 0.8), now + TimeSpan.FromHours(24));
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
CacheTagHelperTest.cs (1)
746ExpiresAfter = TimeSpan.FromHours(1.0)
Microsoft.AspNetCore.Testing.Tests (2)
FakeCertificateFactoryTests.cs (2)
21Assert.True(DateTime.Now > certificate.NotBefore + TimeSpan.FromHours(1)); 22Assert.True(DateTime.Now < certificate.NotAfter - TimeSpan.FromHours(1));
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
169File.SetLastWriteTimeUtc(path0, DateTime.Now + TimeSpan.FromHours(1));
Microsoft.Extensions.AI.Tests (1)
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (1)
91CreatedAt = DateTimeOffset.Parse("2024-08-01T00:00:00Z") + TimeSpan.FromHours(i),
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
FakeTimeProviderTests.cs (1)
154var tz = TimeZoneInfo.CreateCustomTimeZone("DUMMY", TimeSpan.FromHours(2), null, null);
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (2)
14private static readonly TimeSpan DaylightDeltaAdjustment = TimeSpan.FromHours(24.0); 15private static readonly TimeSpan MaxDaylightDelta = TimeSpan.FromHours(12.0);