Update VersionOptions.cs (#5053)

When setting the VersionOptions with the TryParse function to LatestAndPublished, it sets IsLatestOrPublished to true instead of IsLatestAndPublished.
This commit is contained in:
Pietervo 2024-03-18 23:18:15 +01:00 committed by GitHub
parent a4a05dcbf9
commit e7766ce189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,7 @@ public struct VersionOptions
/// <summary>
/// Gets the latest, published version.
/// </summary>
public static readonly VersionOptions LatestAndPublished = new() { IsLatestOrPublished = true };
public static readonly VersionOptions LatestAndPublished = new() { IsLatestAndPublished = true };
/// <summary>
/// Gets the draft version.
@ -114,4 +114,4 @@ public struct VersionOptions
/// Returns a simple string representation of this <see cref="VersionOptions"/>.
/// </summary>
public override string ToString() => AllVersions ? "AllVersions" : IsDraft ? "Draft" : IsLatest ? "Latest" : IsPublished ? "Published" : IsLatestOrPublished ? "LatestOrPublished" : IsLatestAndPublished ? "LatestAndPublished" : Version.ToString();
}
}