private static bool Equals(ConstantMatcher obj1, ConstantMatcher obj2) { if (Object.Equals(null, obj1) || Object.Equals(null, obj2) || obj1.GetType() != obj2.GetType()) return false; if (Object.ReferenceEquals(obj1, obj2)) return true; return Tuple.Create<Type, object>(obj1.ArgumentType, obj1.MatchValue).Equals( Tuple.Create<Type, object>(obj2.ArgumentType, obj2.MatchValue)); }
private static bool Equals(ConstantMatcher obj1, ConstantMatcher obj2) { if (Object.Equals(null, obj1) || Object.Equals(null, obj2) || obj1.GetType() != obj2.GetType()) { return(false); } if (Object.ReferenceEquals(obj1, obj2)) { return(true); } return(Tuple.Create <Type, object>(obj1.ArgumentType, obj1.MatchValue).Equals( Tuple.Create <Type, object>(obj2.ArgumentType, obj2.MatchValue))); }
public override bool Equals(object obj) { return(ConstantMatcher.Equals(this, obj as ConstantMatcher)); }