using StellaOps.VersionComparison; using System.Collections.Immutable; namespace StellaOps.Concelier.Merge.Comparers; /// /// Result of a version comparison with explainability proof lines. /// /// Negative if left < right, zero if equal, positive if left > right. /// Human-readable explanation of comparison steps. /// The comparator type used. public sealed record VersionComparisonResult( int Comparison, ImmutableArray ProofLines, ComparatorType Comparator) { /// /// True if the left version is less than the right version. /// public bool IsLessThan => Comparison < 0; /// /// True if the left version equals the right version. /// public bool IsEqual => Comparison == 0; /// /// True if the left version is greater than the right version. /// public bool IsGreaterThan => Comparison > 0; /// /// True if the left version is greater than or equal to the right version. /// Useful for checking if installed >= fixed. /// public bool IsGreaterThanOrEqual => Comparison >= 0; }