public bool Contains (Attribute attr) { Attribute at = this [attr.GetType ()]; if (at != null) return attr.Equals (at); else return false; }
public static void Equals(Attribute attr1, object obj, bool expected, bool hashEqualityExpected) { Assert.Equal(expected, attr1.Equals(obj)); Attribute attr2 = obj as Attribute; if (attr2 != null) { Assert.Equal(hashEqualityExpected, attr1.GetHashCode() == attr2.GetHashCode()); } }