/// <summary> /// Determines whether the object reference is equal to the provided object. /// </summary> /// <param name="other">The other object.</param> /// <returns><c>true</c> if the object are equal, <c>false</c> if not, and /// <c>null</c> if the conclusion of the comparison is not certain.</returns> public Trilean IsEqualTo(ObjectReference other) { return(IsKnown && IsKnown ? ReferenceEquals(ReferencedObject, other.ReferencedObject) : Trilean.Unknown); }
/// <summary> /// Determines whether the current object reference is considered greater than the provided object reference. /// </summary> /// <param name="other">The other object reference.</param> /// <returns><c>true</c> if the current value is greater than the provided value, <c>false</c> otherwise.</returns> /// <remarks> /// This method is only really reliable when one of the values is the null value. /// </remarks> public Trilean IsGreaterThan(ObjectReference other) { return(IsZero.Value switch { TrileanValue.False when other is { IsZero : { Value : TrileanValue.True } } => true,