192 references to MaxValue
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
312EndTime = DateTime.MaxValue,
Aspire.Dashboard.Tests (7)
TelemetryRepositoryTests\MetricsTests.cs (6)
157EndTime = DateTime.MaxValue 273EndTime = DateTime.MaxValue 478EndTime = DateTime.MaxValue 1119EndTime = DateTime.MaxValue 1176EndTime = DateTime.MaxValue 1188EndTime = DateTime.MaxValue
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
312EndTime = DateTime.MaxValue,
BinaryFormatTests (5)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
224new DateTime[] { DateTime.MaxValue }
FormatTests\FormattedObject\HashTableTests.cs (1)
212{ DateTime.MinValue, DateTime.MaxValue },
FormatTests\FormattedObject\ListTests.cs (1)
34DateTime.MaxValue,
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
87{ (byte)PrimitiveType.DateTime, DateTime.MaxValue }, 136DateTime.MaxValue,
dotnet-svcutil-lib (15)
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (3)
445if (ticks > DateTime.MaxValue.Ticks) 449if (ticks > DateTime.MaxValue.Ticks) 450ticks = DateTime.MaxValue.Ticks;
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (2)
885result = DateTime.MaxValue; 988if (hourDelta >= 0 && (value < DateTime.MaxValue - ts) ||
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (4)
30_deadline = DateTime.MaxValue; 121if (timeout >= TimeSpan.Zero && DateTime.MaxValue - time <= timeout) 123return DateTime.MaxValue; 154else if (_deadline == DateTime.MaxValue)
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (1)
51return new DateTime(DateTime.MaxValue.Ticks - TimeSpan.TicksPerDay, DateTimeKind.Utc);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
258return new DateTime(DateTime.MaxValue.Ticks - TimeSpan.TicksPerDay, DateTimeKind.Utc);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TimeBoundedCache.cs (2)
344Fx.Assert(item.ExpirationTime == DateTime.MaxValue || item.ExpirationTime.Kind == DateTimeKind.Utc, ""); 500Fx.Assert(expirationTime == DateTime.MaxValue || expirationTime.Kind == DateTimeKind.Utc, "");
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\BinarySecretSecurityToken.cs (1)
77get { return DateTime.MaxValue; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\WrappedKeySecurityToken.cs (1)
110get { return DateTime.MaxValue; }
Extensibility.MessageInterceptor.IntegrationTests (4)
TimeoutHelper.cs (4)
28this._deadline = DateTime.MaxValue; 43if (this._deadline == DateTime.MaxValue) 101if (timeout >= TimeSpan.Zero && DateTime.MaxValue - time <= timeout) 103return DateTime.MaxValue;
Microsoft.AspNetCore.Authentication.Test (8)
JwtBearerTests.cs (2)
976expires: DateTime.MaxValue, 1008var max = DateTime.Parse(DateTime.MaxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
JwtBearerTests_Handler.cs (2)
920expires: DateTime.MaxValue, 951var max = DateTime.Parse(DateTime.MaxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
OpenIdConnect\OpenIdConnectTests.cs (4)
403Assert.Equal(DateTime.MaxValue, GetNonceExpirationTime(noncePrefix + DateTime.MaxValue.Ticks.ToString(CultureInfo.InvariantCulture) + nonceDelimiter, TimeSpan.FromHours(1))); 582if ((nonceTime >= DateTime.UtcNow) && ((DateTime.MaxValue - nonceTime) < nonceLifetime)) 584nonceTime = DateTime.MaxValue;
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
137protected override DateTime DeadlineCore => DateTime.MaxValue;
Microsoft.Build (1)
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
1044DateTime inputFileTime = DateTime.MaxValue;
Microsoft.Build.Engine.UnitTests (2)
BackEnd\KnownTelemetry_Tests.cs (2)
106buildTelemetry.FinishedAt = DateTime.MaxValue; 114buildTelemetry.FinishedAt = DateTime.MaxValue;
Microsoft.Build.Tasks.Core (1)
SystemState.cs (1)
223internal static DateTime ImmutableFileLastModifiedMarker => DateTime.MaxValue;
Microsoft.CodeAnalysis (2)
MetadataReader\PEModule.cs (1)
1604if (value < DateTime.MinValue.Ticks || value > DateTime.MaxValue.Ticks)
Symbols\Attributes\CommonAttributeData.cs (1)
245if (value < DateTime.MinValue.Ticks || value > DateTime.MaxValue.Ticks)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
4022dateTimeConst = ConstantValue.Create(DateTime.MaxValue),
Microsoft.Data.Analysis (1)
DateTimeComputation.cs (1)
253var minDate = DateTime.MaxValue;
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (2)
249DateTime whenItExpires = DateTime.MaxValue; 255if (whenItExpires != DateTime.MaxValue) // We recognized a date from the string
Microsoft.DotNet.SignCheckLibrary (9)
Verification\LinuxPackageVerifier.cs (3)
93SignedOn = signatureTimestampsMatch.GroupValueOrDefault("signedOn").DateTimeOrDefault(DateTime.MaxValue), 94ExpiryDate = signatureTimestampsMatch.GroupValueOrDefault("expiresOn").DateTimeOrDefault(DateTime.MaxValue), 96EffectiveDate = keyInfoMatch.GroupValueOrDefault("createdOn").DateTimeOrDefault(DateTime.MaxValue)
Verification\MachOVerifier.cs (3)
101EffectiveDate = DateTime.MaxValue, 141return timestampRegex.Match(timestampOutput).GroupValueOrDefault("timestamp").DateTimeOrDefault(DateTime.MaxValue); 171DateTime effectiveOn = effectiveOnRegex.Match(opensslOutput).GroupValueOrDefault("effectiveOn").DateTimeOrDefault(DateTime.MaxValue);
Verification\PkgVerifier.cs (1)
124DateTime signedOnTimestamp = signedOnRegex.Match(signingVerificationOutput).GroupValueOrDefault("timestamp").DateTimeOrDefault(DateTime.MaxValue);
Verification\Timestamp.cs (2)
62if (SignedOn == DateTime.MaxValue || ExpiryDate == DateTime.MinValue || EffectiveDate == DateTime.MaxValue)
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
84AdditionalValues: [DateTime.MinValue, DateTime.MaxValue],
Microsoft.Gen.Logging.Generated.Tests (2)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (2)
85public DateTime DateTimeProperty { get; set; } = DateTime.MaxValue; 143public DateTime GetOnlyProperty => DateTime.MaxValue;
PresentationCore (1)
MS\Internal\FontCache\FontSource.cs (1)
152return DateTime.MaxValue;
PresentationFramework (8)
MS\Internal\Documents\TextBoxView.cs (1)
2209stopTime = DateTime.MaxValue;
System\Windows\Controls\Calendar.cs (3)
667return this.DisplayDateEnd.GetValueOrDefault(DateTime.MaxValue); 1366if (DateTimeHelper.CompareYearMonth(DateTime.MaxValue, selectedDate.Value) > 0) 1374selectedDate = DateTime.MaxValue;
System\Windows\Controls\CalendarDateRange.cs (1)
23this(DateTime.MinValue, DateTime.MaxValue)
System\Windows\Controls\Primitives\CalendarItem.cs (3)
1035bool isMaxMonth = DateTimeHelper.CompareYearMonth(firstDayOfMonth, DateTime.MaxValue) >= 0; 1200if (DateTimeHelper.CompareYearMonth(firstDayOfMonth, DateTime.MaxValue) == 0) 1237if (year <= DateTime.MaxValue.Year && year >= DateTime.MinValue.Year)
PresentationUI (10)
MS\Internal\Documents\RightsManagementProvider.cs (6)
540DateTime.MaxValue); 711DateTime.MaxValue); 782DateTime.MaxValue); 841grantList.Add(CreateGrant(_user, ContentRight.Owner, DateTime.MinValue, DateTime.MaxValue)); 1071ValidUntil = DateTime.MaxValue 1081DateTime validUntil = DateTime.MaxValue;
MS\Internal\Documents\RMPermissions.cs (1)
144date.Value.Equals(DateTime.MaxValue))
MS\Internal\Documents\RMPublishingDialog.cs (3)
86DateTime validUntil = DateTime.MaxValue; 100if (validUntil < DateTime.MaxValue) 253rmLicense.ValidUntil = DateTime.MaxValue;
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
84AdditionalValues: [DateTime.MinValue, DateTime.MaxValue],
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (2)
131var lastBytesWritten = DateTime.MaxValue; 224var lastBytesWritten = DateTime.MaxValue;
System.Data.Common (3)
System\Data\Common\DateTimeStorage.cs (1)
29DateTime min = DateTime.MaxValue;
System\Data\SQLTypes\SQLDateTime.cs (2)
56private static readonly TimeSpan s_maxTimeSpan = DateTime.MaxValue.Subtract(s_SQLBaseDate); 261if (value == DateTime.MaxValue)
System.Net.Primitives (3)
System\Net\CookieCollection.cs (1)
163m_TimeStamp = DateTime.MaxValue;
System\Net\CookieContainer.cs (2)
327DateTime oldUsed = DateTime.MaxValue; 449if (oldUsed == DateTime.MaxValue)
System.Net.Requests (1)
System\Net\Cache\HttpRequestCachePolicy.cs (1)
83_lastSyncDateUtc == DateTime.MinValue || _lastSyncDateUtc == DateTime.MaxValue ?
System.Net.Security (1)
src\libraries\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs (1)
28_expiry = DateTime.MaxValue;
System.Private.CoreLib (23)
src\libraries\Common\src\System\TimeProvider.cs (1)
41private static readonly long s_maxDateTicks = DateTime.MaxValue.Ticks;
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (2)
930/// The resulting <see cref="DateTime"/> is less than <see cref="MinValue"/> or greater than <see cref="MaxValue"/>. 1226offsetTicks = TimeZoneInfo.GetLocalUtcOffset(ticks < MinTicks ? MinValue : MaxValue, TimeZoneInfoOptions.NoThrowOnInvalidTime).Ticks;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
179return DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
39public virtual DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
66return new DateTime(Math.Min((long)(Math.Floor(numberOfDays) * TimeSpan.TicksPerDay), DateTime.MaxValue.Ticks)).Year;
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendar.cs (1)
33public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (1)
62private static readonly DateTime s_calendarMaxValue = DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
39public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (1)
40public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
39public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (1)
42private static readonly DateTime s_maxDate = DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
40public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Globalization\ThaiBuddhistCalendar.cs (1)
30public override DateTime MaxSupportedDateTime => DateTime.MaxValue;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (1)
221if (dateEnd != DateTime.MaxValue && dateEnd.Kind == DateTimeKind.Unspecified && dateEnd.TimeOfDay != TimeSpan.Zero)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (4)
1301ticks > DateTime.MaxTicks ? DateTime.MaxValue : 1315ticks > DateTime.MaxTicks ? DateTime.MaxValue : 1324ticks > DateTime.MaxTicks ? DateTime.MaxValue : 1884rule = zone.GetAdjustmentRuleForTime(DateTime.MaxValue, out ruleIndex);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (4)
631DateTime.MaxValue, 746DateTime.MaxValue, 758DateTime.MaxValue, 1140unixTime > DateTimeOffset.UnixMaxSeconds ? DateTime.MaxValue :
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (1)
195if ((tickCount > DateTime.MaxValue.Ticks) || (tickCount < DateTime.MinValue.Ticks))
System\Xml\XmlConverter.cs (2)
845result = DateTime.MaxValue; 948if (hourDelta >= 0 && (value < DateTime.MaxValue - ts) ||
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
80new List<DateTime> { DateTime.MinValue, DateTime.MaxValue }, 100new DateTime[] { DateTime.MinValue, DateTime.MaxValue },
System\Value\StoringDateTime.cs (1)
12{ DateTime.MaxValue },
System.Private.Xml (3)
System\Xml\Schema\XsdDateTime.cs (3)
426if (ticks > DateTime.MaxValue.Ticks) 430if (ticks > DateTime.MaxValue.Ticks) 431ticks = DateTime.MaxValue.Ticks;
System.Runtime.Caching (2)
System\Runtime\Caching\CacheExpires.cs (1)
132_utcMinExpires = DateTime.MaxValue;
System\Runtime\Caching\MemoryCacheEntry.cs (1)
47return _utcAbsExp < DateTime.MaxValue;
System.ServiceModel.Federation (4)
System\Runtime\TimeoutHelper.cs (2)
22_deadline = DateTime.MaxValue; 114else if (_deadline == DateTime.MaxValue)
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (2)
70if (ticks > 0 && DateTime.MaxValue.Subtract(time).Ticks <= ticks) 71return DateTime.MaxValue;
System.ServiceModel.NetNamedPipe (3)
System\Runtime\BackoffTimeoutHelper.cs (3)
43_deadline = DateTime.MaxValue; 54if (_deadline == DateTime.MaxValue) 89if (_deadline != DateTime.MaxValue)
System.Windows.Forms (7)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (2)
88private DateTime _maxDateTime = DateTime.MaxValue; 1405return _maxDateTime != MaximumDateTime && _maxDateTime != DateTime.MaxValue;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
100private DateTime _maxDate = DateTime.MaxValue; 1612private void ResetMaxDate() => MaxDate = DateTime.MaxValue; 1922=> _maxDate != DateTimePicker.MaximumDateTime && _maxDate != DateTime.MaxValue;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
471internal DateTime MaxDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.MaxDate : DateTime.MaxValue;
System\Windows\Forms\Controls\MonthCalendar\SelectionRange.cs (1)
22private DateTime _end = DateTime.MaxValue.Date;
System.Windows.Forms.Tests (34)
System\Resources\ResxDataNodeTests.cs (1)
135{ DateTime.MinValue, DateTime.MaxValue },
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
106DateTime.MaxValue,
System\Windows\Forms\MonthCalendarTests.cs (32)
175yield return new object[] { new DateTime[] { DateTime.MinValue, DateTime.MaxValue }, new DateTime[] { DateTime.MinValue, DateTime.MaxValue } }; 503yield return new object[] { new DateTime[] { DateTime.MinValue, DateTime.MaxValue }, new DateTime[] { DateTime.MinValue, DateTime.MaxValue } }; 1317yield return new object[] { DateTime.MaxValue, new DateTime(9998, 12, 31), DateTime.Now.Date }; 1529yield return new object[] { new DateTime[] { DateTime.MinValue, DateTime.MaxValue }, new DateTime[] { DateTime.MinValue, DateTime.MaxValue } }; 1952yield return new object[] { DateTime.MaxValue, DateTime.MaxValue }; 2131yield return new object[] { new SelectionRange(DateTime.MaxValue, DateTime.MaxValue), DateTime.MaxValue.Date, DateTime.MaxValue.Date }; 2852yield return new object[] { DateTime.MaxValue }; 3020calendar.AddAnnuallyBoldedDate(DateTime.MaxValue); 3021Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.AnnuallyBoldedDates); 3085calendar.AddAnnuallyBoldedDate(DateTime.MaxValue); 3086Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.AnnuallyBoldedDates); 3127calendar.AddBoldedDate(DateTime.MaxValue); 3128Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.BoldedDates); 3192calendar.AddBoldedDate(DateTime.MaxValue); 3193Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.BoldedDates); 3234calendar.AddMonthlyBoldedDate(DateTime.MaxValue); 3235Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.MonthlyBoldedDates); 3299calendar.AddMonthlyBoldedDate(DateTime.MaxValue); 3300Assert.Equal(new DateTime[] { new(2019, 10, 3), new(2019, 10, 5), new(2019, 09, 5), new(2018, 09, 5), new(2018, 09, 5), DateTime.MinValue, DateTime.MaxValue }, calendar.MonthlyBoldedDates); 3961yield return new object[] { DateTime.MaxValue }; 4068yield return new object[] { DateTime.MaxValue, DateTime.MaxValue, DateTime.MaxValue, DateTime.MaxValue }; 4514calendar.MaxDate = DateTime.MaxValue;
WindowsBase.Tests (17)
System\Security\RightsManagement\ContentGrantTests.cs (17)
33Assert.Equal(DateTime.MaxValue, grant.ValidUntil); 37yield return new object[] { ContentUser.AnyoneUser, ContentRight.View, DateTime.MinValue, DateTime.MaxValue }; 38yield return new object[] { ContentUser.OwnerUser, ContentRight.Edit, DateTime.MinValue, DateTime.MaxValue }; 39yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Print, DateTime.MinValue, DateTime.MaxValue }; 40yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Extract, DateTime.MinValue, DateTime.MaxValue }; 41yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.ObjectModel, DateTime.MinValue, DateTime.MaxValue }; 42yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Owner, DateTime.MinValue, DateTime.MaxValue }; 43yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.ViewRightsData, DateTime.MinValue, DateTime.MaxValue }; 44yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Forward, DateTime.MinValue, DateTime.MaxValue }; 45yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Reply, DateTime.MinValue, DateTime.MaxValue }; 46yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.ReplyAll, DateTime.MinValue, DateTime.MaxValue }; 47yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Sign, DateTime.MinValue, DateTime.MaxValue }; 48yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.DocumentEdit, DateTime.MinValue, DateTime.MaxValue }; 49yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Export, DateTime.MinValue, DateTime.MaxValue }; 51yield return new object[] { new ContentUser("name", AuthenticationType.Windows), ContentRight.Export, DateTime.MaxValue, DateTime.MaxValue }; 70Assert.Throws<ArgumentNullException>("user", () => new ContentGrant(null, ContentRight.View, DateTime.MinValue, DateTime.MaxValue));