Ejemplo n.º 1
0
        public void OperatorEquality()
        {
            EquatableClass eNull = null;
            EquatableClass e1    = new EquatableClass(1);
            EquatableClass e1b   = new EquatableClass(1);
            EquatableClass e2    = new EquatableClass(2);

            Assert.IsTrue(ObjectImpl.OperatorEquality(eNull, null));
            Assert.IsTrue(ObjectImpl.OperatorEquality(e1, e1));
            Assert.IsTrue(ObjectImpl.OperatorEquality(e1, e1b));
            Assert.IsFalse(ObjectImpl.OperatorEquality(e1, eNull));
            Assert.IsFalse(ObjectImpl.OperatorEquality(eNull, e1));
            Assert.IsFalse(ObjectImpl.OperatorEquality(e1, e2));
        }
Ejemplo n.º 2
0
 public static bool operator ==(ActionMatrixEntryKey left, ActionMatrixEntryKey right)
 {
     return(ObjectImpl.OperatorEquality(left, right));
 }
Ejemplo n.º 3
0
 public static bool operator ==(StringValueTag left, ValueTagBase right)
 {
     return(ObjectImpl.OperatorEquality(left, right));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Determines whether two specified <see cref="EquatableClass"/> objects have the same value.
 /// </summary>
 /// <param name="left">An <see cref="EquatableClass"/> or a <c>null</c> reference.</param>
 /// <param name="right">An <see cref="EquatableClass"/> or a <c>null</c> reference.</param>
 /// <returns><c>true</c> if the value of <paramref name="left"/> is the same as the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator ==(EquatableClass left, EquatableClass right)
 {
     return(ObjectImpl.OperatorEquality(left, right));
 }