private static bool Equals(AnyValueMatcher <T> obj1, AnyValueMatcher <T> obj2) { if (Object.Equals(null, obj1) || Object.Equals(null, obj2) || obj1.GetType() != obj2.GetType()) { return(false); } // If both are non-null and they have the same type, // they match essentially any value of the same type, // so they are equal. return(true); }
static AnyValueMatcher() { Instance = new AnyValueMatcher <T>(); }
public override bool Equals(object obj) { return(AnyValueMatcher <T> .Equals(this, obj as AnyValueMatcher <T>)); }