public void CtorTest1 () { ContentWrapperAttribute attr = new ContentWrapperAttribute (typeof (ValueSerializer)); Assert.AreEqual ("ValueSerializer", attr.ContentWrapper.Name); attr = new ContentWrapperAttribute (null); Assert.IsNull (attr.ContentWrapper); }
public override bool Equals(object obj) { ContentWrapperAttribute attribute = obj as ContentWrapperAttribute; if (attribute == null) { return(false); } return(this._contentWrapper == attribute._contentWrapper); }
/// <summary> /// Overrides Object.Equals to implement correct equality semantics for this /// attribute. /// </summary> public override bool Equals(object obj) { ContentWrapperAttribute other = obj as ContentWrapperAttribute; if (other == null) { return(false); } return(_contentWrapper == other._contentWrapper); }
/// <summary> /// Determines whether the specified <see cref="ContentWrapperAttribute"/> /// is equivalent this <see cref="ContentWrapperAttribute"/> by comparing /// the <see cref="ContentWrapperAttribute.ContentWrapper"/> properties. /// </summary> public override bool Equals(object obj) { ContentWrapperAttribute wrapperAttribute = obj as ContentWrapperAttribute; if (wrapperAttribute == null) { return(false); } else { return(this.ContentWrapper == wrapperAttribute.ContentWrapper); } }
public void TypeId () { ContentWrapperAttribute attr = new ContentWrapperAttribute (typeof (ValueSerializer)); Assert.AreSame (attr, attr.TypeId); }