コード例 #1
0
 /// <inheritdoc />
 public int CompareTo(IdFor <TEntity, TId>?other)
 {
     if (ReferenceEquals(null, other))
     {
         return(1);
     }
     if (ReferenceEquals(this, other))
     {
         return(0);
     }
     return(Comparer <TId> .Default.Compare(Value, other.Value));
 }
コード例 #2
0
 /// <inheritdoc />
 public bool Equals(IdFor <TEntity, TId>?other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(EqualityComparer <TId> .Default.Equals(Value, other.Value));
 }