Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #3
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 <T> left, ValueObject <T> right)
 {
     return(!EqualOperator(left, right));
 }