Inheritance: System.Attribute
コード例 #1
0
		public void CtorTest1 ()
		{
			ContentWrapperAttribute attr = new ContentWrapperAttribute (typeof (ValueSerializer));
			Assert.AreEqual ("ValueSerializer", attr.ContentWrapper.Name);

			attr = new ContentWrapperAttribute (null);
			Assert.IsNull (attr.ContentWrapper);
		}
コード例 #2
0
        public override bool Equals(object obj)
        {
            ContentWrapperAttribute attribute = obj as ContentWrapperAttribute;

            if (attribute == null)
            {
                return(false);
            }
            return(this._contentWrapper == attribute._contentWrapper);
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        /// <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);
            }
        }
コード例 #5
0
		public void TypeId ()
		{
			ContentWrapperAttribute attr = new ContentWrapperAttribute (typeof (ValueSerializer));
			Assert.AreSame (attr, attr.TypeId);
		}