| 1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Core.Mes.Client.Comm.Attribute
- {
- /// <summary>
- /// 用来标识实体类的属性最大长度
- /// </summary>
- [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
- public class DataLengthAttribute : System.Attribute
- {
- private int _dataLength = 1;
- /// <summary>
- /// 字段长度
- /// </summary>
- public int DataLength
- {
- get { return _dataLength; }
- set { _dataLength = value; }
- }
- /// <summary>
- /// 字段长度特性构造函数
- /// </summary>
- /// <param name="nullable">字段长度</param>
- public DataLengthAttribute(int dataLength)
- {
- _dataLength = dataLength;
- }
- }
- }
|