示例#1
0
        public int CompareTo(LocatedRef <T> other)
        {
            var comparable = Value as IComparable <T>;

            return(comparable?.CompareTo(other.Value) ??
                   Comparer <T> .Default.Compare(Value, other.Value));
        }
示例#2
0
 public bool Equals(LocatedRef <T> other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(EqualityComparer <T> .Default.Equals(Value, other.Value));
 }