Esempio n. 1
0
 /// <summary>
 /// Helper function for implementing overloaded equality operator.
 /// </summary>
 /// <param name="left">Left-hand side object.</param>
 /// <param name="right">Right-hand side object.</param>
 /// <returns></returns>
 protected static bool EqualOperator(ValueObject left, ValueObject right)
 {
     if (ReferenceEquals(left, null) ^ ReferenceEquals(right, null))
     {
         return false;
     }
     return ReferenceEquals(left, null) || left.Equals(right);
 }
Esempio n. 2
0
 /// <summary>
 /// Helper function for implementing overloaded inequality operator.
 /// </summary>
 /// <param name="left">Left-hand side object.</param>
 /// <param name="right">Right-hand side object.</param>
 /// <returns></returns>
 protected static bool NotEqualOperator(ValueObject left, ValueObject right)
 {
     return !EqualOperator(left, right);
 }