public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            DataObjectFieldAttribute attribute = obj as DataObjectFieldAttribute;

            return((((attribute != null) && (attribute.IsIdentity == this.IsIdentity)) && ((attribute.IsNullable == this.IsNullable) && (attribute.Length == this.Length))) && (attribute.PrimaryKey == this.PrimaryKey));
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            DataObjectFieldAttribute other = obj as DataObjectFieldAttribute;

            if (other == null)
            {
                return(false);
            }

            return(other.primary_key == primary_key &&
                   other.is_identity == is_identity &&
                   other.is_nullable == is_nullable &&
                   other.length == length);
        }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            DataObjectFieldAttribute other = obj as DataObjectFieldAttribute;

            return((other != null) &&
                   (other.IsIdentity == IsIdentity) &&
                   (other.IsNullable == IsNullable) &&
                   (other.Length == Length) &&
                   (other.PrimaryKey == PrimaryKey));
        }
Ejemplo n.º 4
0
        /// <summary>构造函数</summary>
        /// <param name="table"></param>
        /// <param name="property"></param>
        public FieldItem(TableItem table, PropertyInfo property)
        {
            if (property == null) throw new ArgumentNullException("property");

            _Table = table;

            _Property = property;
            _Column = BindColumnAttribute.GetCustomAttribute(_Property);
            _DataObjectField = DataObjectAttribute.GetCustomAttribute(_Property, typeof(DataObjectFieldAttribute)) as DataObjectFieldAttribute;
            _Description = DescriptionAttribute.GetCustomAttribute(_Property, typeof(DescriptionAttribute)) as DescriptionAttribute;
        }