129 references to MinValue
Microsoft.AspNetCore.Authentication.Test (4)
JwtBearerTests.cs (2)
954Assert.NotEqual(DateTimeOffset.MinValue, token.ValidTo); 955Assert.NotEqual(DateTimeOffset.MinValue, token.ValidFrom);
JwtBearerTests_Handler.cs (2)
899Assert.NotEqual(DateTimeOffset.MinValue, token.ValidTo); 900Assert.NotEqual(DateTimeOffset.MinValue, token.ValidFrom);
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\DefaultKeyResolverTests.cs (1)
462mockKey.Setup(o => o.CreationDate).Returns(creationDate ?? DateTimeOffset.MinValue);
Microsoft.AspNetCore.Http.Results.Tests (29)
PhysicalFileResultTest.cs (1)
26var lastModified = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\FileContentResultTestBase.cs (4)
96var lastModified = DateTimeOffset.MinValue; 107requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue); 135var lastModified = DateTimeOffset.MinValue.AddDays(1); 169var lastModified = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (5)
75var lastModified = DateTimeOffset.MinValue; 116var lastModified = DateTimeOffset.MinValue; 129requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue); 153var lastModified = DateTimeOffset.MinValue.AddDays(1); 166requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (9)
43requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 75requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 107requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 134requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 163requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 189requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 218requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue; 245requestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(1); 300requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (10)
56requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 93requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 130requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 163requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 199requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 232requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 268requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue; 299requestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(1); 335requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 513var lastModified = DateTimeOffset.MinValue.AddDays(1);
Microsoft.AspNetCore.Identity.Test (1)
UserManagerTest.cs (1)
1615return Task.FromResult<DateTimeOffset?>(DateTimeOffset.MinValue);
Microsoft.AspNetCore.Mvc.Core.Test (36)
FileResultHelperTest.cs (7)
250var lastModified = DateTimeOffset.MinValue; 264httpRequestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(1); 291var lastModified = DateTimeOffset.MinValue.AddDays(1); 302httpRequestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue; 303httpRequestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(2); 328var lastModified = DateTimeOffset.MinValue; 364var lastModified = DateTimeOffset.MinValue;
PhysicalFileResultTest.cs (1)
46var lastModified = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\FileContentResultTestBase.cs (4)
96var lastModified = DateTimeOffset.MinValue; 107requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue); 135var lastModified = DateTimeOffset.MinValue.AddDays(1); 169var lastModified = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (5)
75var lastModified = DateTimeOffset.MinValue; 116var lastModified = DateTimeOffset.MinValue; 129requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue); 153var lastModified = DateTimeOffset.MinValue.AddDays(1); 166requestHeaders.IfRange = new RangeConditionHeaderValue(DateTimeOffset.MinValue);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (9)
43requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 75requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 107requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 134requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 163requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 189requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 218requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue; 245requestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(1); 300requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (10)
56requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 93requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 130requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 163requestHeaders.IfModifiedSince = DateTimeOffset.MinValue; 199requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 232requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 268requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue; 299requestHeaders.IfModifiedSince = DateTimeOffset.MinValue.AddDays(1); 335requestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue.AddDays(1); 513var lastModified = DateTimeOffset.MinValue.AddDays(1);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (5)
RedisOutputCacheStore.cs (5)
381if (firstErrorTime == DateTimeOffset.MinValue) 404WriteTimeTicks(ref _firstErrorTimeTicks, DateTimeOffset.MinValue); 405WriteTimeTicks(ref _previousErrorTimeTicks, DateTimeOffset.MinValue); 470var ticks = value == DateTimeOffset.MinValue ? 0L : value.UtcTicks; 482return ticks == 0 ? DateTimeOffset.MinValue : new DateTimeOffset(ticks, TimeSpan.Zero);
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
734client.DefaultRequestHeaders.IfModifiedSince = DateTimeOffset.MinValue;
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingMiddlewareTests.cs (1)
638var utcNow = DateTimeOffset.MinValue;
ResponseCachingTests.cs (1)
683client.DefaultRequestHeaders.IfModifiedSince = DateTimeOffset.MinValue;
Microsoft.AspNetCore.StaticAssets.Tests (2)
StaticAssetsIntegrationTests.cs (2)
944req2.Headers.IfModifiedSince = DateTimeOffset.MinValue; 985req2.Headers.IfUnmodifiedSince = DateTimeOffset.MinValue;
Microsoft.AspNetCore.StaticFiles.Tests (2)
CacheHeaderTests.cs (2)
375.And(req => req.Headers.IfModifiedSince = DateTimeOffset.MinValue) 424.And(req => req.Headers.IfUnmodifiedSince = DateTimeOffset.MinValue)
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
86AdditionalValues: [DateTimeOffset.MinValue, DateTimeOffset.MaxValue],
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Storage\AzureStorageResultStore.cs (1)
51foreach (PathItem item in paths.OrderByDescending(item => item.CreatedOn ?? DateTimeOffset.MinValue).Take(count ?? 1))
Microsoft.Extensions.Caching.StackExchangeRedis (5)
RedisCache.cs (5)
71return ticks == 0 ? DateTimeOffset.MinValue : new DateTimeOffset(ticks, TimeSpan.Zero); 76var ticks = value == DateTimeOffset.MinValue ? 0L : value.UtcTicks; 648if (firstErrorTime == DateTimeOffset.MinValue) 671WriteTimeTicks(ref _firstErrorTimeTicks, DateTimeOffset.MinValue); 672WriteTimeTicks(ref _previousErrorTimeTicks, DateTimeOffset.MinValue);
Microsoft.Extensions.FileProviders.Abstractions (2)
NotFoundFileInfo.cs (2)
35/// Gets <see cref="DateTimeOffset.MinValue"/>. 37public DateTimeOffset LastModified => DateTimeOffset.MinValue;
Microsoft.Extensions.Logging.Console (3)
JsonConsoleFormatter.cs (1)
47: DateTimeOffset.MinValue;
SimpleConsoleFormatter.cs (1)
160: DateTimeOffset.MinValue;
SystemdConsoleFormatter.cs (1)
117: DateTimeOffset.MinValue;
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
TimerTests.cs (1)
252var callbackTime = DateTimeOffset.MinValue;
Microsoft.Gen.Logging.Generated.Tests (2)
LogPropertiesTests.cs (2)
383var transitiveStruct = new MyTransitiveStruct { DateTimeOffsetProperty = DateTimeOffset.MinValue }; 413var transitiveStruct = new MyTransitiveStruct { DateTimeOffsetProperty = DateTimeOffset.MinValue };
Microsoft.Net.Http.Headers (1)
RangeConditionHeaderValue.cs (1)
148DateTimeOffset date = DateTimeOffset.MinValue;
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
93public DateTimeOffset LastModified => DateTimeOffset.MinValue;
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
86AdditionalValues: [DateTimeOffset.MinValue, DateTimeOffset.MaxValue], 144Value: DateTimeOffset.MinValue,
System.ComponentModel.TypeConverter (2)
System\ComponentModel\DateTimeOffsetConverter.cs (2)
46return DateTimeOffset.MinValue; 88if (dto == DateTimeOffset.MinValue)
System.Data.Common (2)
System\Data\Common\DateTimeOffsetStorage.cs (2)
12private static readonly DateTimeOffset s_defaultValue = DateTimeOffset.MinValue; 46DateTimeOffset max = DateTimeOffset.MinValue;
System.Formats.Tar (2)
System\Formats\Tar\PaxTarEntry.cs (1)
82/// <remarks>When converting a <see cref="GnuTarEntry"/> to <see cref="PaxTarEntry"/> using this constructor, the <see cref="GnuTarEntry.AccessTime"/> and <see cref="GnuTarEntry.ChangeTime"/> values will get transfered to the <see cref="ExtendedAttributes" /> dictionary only if their values are not <see langword="default"/> (which is <see cref="DateTimeOffset.MinValue"/>).</remarks>
System\Formats\Tar\TarWriter.cs (1)
232/// <para>When writing a <see cref="GnuTarEntry"/> using this method, if <see cref="GnuTarEntry.AccessTime"/> and/or <see cref="GnuTarEntry.ChangeTime" /> are set, they will be preserved in the archive. These fields are unsupported by most TAR tools, so to ensure the archive is readable by other tools, make sure to set <see cref="GnuTarEntry.AccessTime"/> and <see cref="GnuTarEntry.ChangeTime"/> to <see langword="default"/> or <see cref="DateTimeOffset.MinValue"/>.</para>
System.Net.Http (3)
System\Net\Http\Headers\HttpContentHeaders.cs (1)
99get { return HeaderUtilities.GetDateTimeOffsetValue(KnownHeaders.Expires.Descriptor, this, DateTimeOffset.MinValue); }
System\Net\Http\Headers\RangeConditionHeaderValue.cs (1)
88DateTimeOffset date = DateTimeOffset.MinValue;
System\Net\Http\Headers\RetryConditionHeaderValue.cs (1)
91DateTimeOffset date = DateTimeOffset.MinValue;
System.Net.Security (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (1)
77expiration = DateTimeOffset.MinValue;
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (2)
323/// The <see cref="UtcDateTime"/> property is earlier than <see cref="MinValue"/> or later than <see cref="MaxValue"/>. 491/// The resulting <see cref="DateTimeOffset"/> value is less than <see cref="MinValue"/>
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (1)
718ticks < DateTime.MinTicks ? DateTimeOffset.MinValue :
System.Private.Windows.Core.Tests (1)
System\Value\StoringDateTimeOffset.cs (1)
13{ DateTimeOffset.MinValue }
System.Security.Cryptography (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (1)
77expiration = DateTimeOffset.MinValue;
System.ServiceModel.Syndication (9)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (4)
400if (lastUpdatedTime == DateTimeOffset.MinValue && isRequired) 404if (lastUpdatedTime != DateTimeOffset.MinValue) 435if (lastUpdatedTime == DateTimeOffset.MinValue) 1152if (item.PublishDate != DateTimeOffset.MinValue)
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (3)
865if (Feed.LastUpdatedTime > DateTimeOffset.MinValue) 1074if (item.PublishDate > DateTimeOffset.MinValue) 1107if (item.LastUpdatedTime > DateTimeOffset.MinValue)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
42: this(title, description, feedAlternateLink, null, DateTimeOffset.MinValue, items)
System\ServiceModel\Syndication\SyndicationItem.cs (1)
27: this(title, content, itemAlternateLink, null, DateTimeOffset.MinValue)
System.Xaml.Tests (3)
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (3)
70yield return new object?[] { DateTimeOffset.MinValue, null }; 112Assert.Throws<NotSupportedException>(() => converter.ConvertTo(DateTimeOffset.MinValue, destinationType)); 120Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(DateTimeOffset.MinValue, null!));