コード例 #1
0
        static bool Equals(AnyMatcher <T> obj1, AnyMatcher <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);
        }
コード例 #2
0
ファイル: AnyMatcher`1.cs プロジェクト: vcgato29/moq
 public bool Equals(AnyMatcher <T> other) => other != null;
コード例 #3
0
 public bool Equals(AnyMatcher <T> other) => Equals(other);