209 references to MaxValue
Aspire.Dashboard (1)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (9)
BinaryFormatTests (5)
dotnet-svcutil-lib (15)
Microsoft.AspNetCore.Authentication.Test (8)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.Build (1)
Microsoft.Build.Engine.UnitTests (2)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.Data.Analysis (1)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.SignCheckLibrary (9)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Dns (4)
Microsoft.Gen.Logging.Generated.Tests (2)
PresentationCore (1)
PresentationFramework (8)
PresentationUI (10)
Shared.Tests (1)
Sockets.FunctionalTests (2)
System.Data.Common (2)
System.Net.Primitives (3)
System.Net.Requests (1)
System.Net.Security (1)
System.Private.CoreLib (26)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Cache.cs (6)
343=> (ulong)ticks <= DateTime.MaxTicks ? new DateTime(ticks, kind) : (ticks < 0 ? DateTime.MinValue : DateTime.MaxValue);
556year >= MaxYear ? DateTime.MaxValue : new DateTime(year + 1, 1, 1, 0, 0, 0, DateTimeKind.Unspecified) :
779DateTime endOfCurrentYear = year < MaxYear ? new DateTime(year + 1, 1, 1).AddTicks(-1) : DateTime.MaxValue;
886DateTime endOfNextYear = year + 1 < MaxYear ? new DateTime(year + 2, 1, 1).AddTicks(-1) : DateTime.MaxValue;
1039DateTime endOfCurrentYear = year < MaxYear ? new DateTime(year + 1, 1, 1).AddTicks(-1) : DateTime.MaxValue;
1223DateTime endOfCurrentYear = year < MaxYear ? new DateTime(year + 1, 1, 1).AddTicks(-1) : DateTime.MaxValue;
System.Private.DataContractSerialization (3)
System.Private.Windows.Core.Tests (4)
System.Private.Xml (4)
System.Runtime.Caching (2)
System.ServiceModel.Federation (4)
System.ServiceModel.NetNamedPipe (3)
System.ServiceModel.Primitives (9)
System.Text.Json (1)
System.Windows.Forms (7)
System.Windows.Forms.Tests (34)
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));