CustomAttribute.cs 708 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace Common
  3. {
  4. public class CustomAttribute
  5. {
  6. /// <summary>
  7. /// 彩种表名称特性
  8. /// </summary>
  9. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  10. public sealed class TableNameAttribute : Attribute
  11. {
  12. private string _tablename;
  13. public string TableName { get { return _tablename; } }
  14. /// <summary>
  15. /// 构造函数
  16. /// </summary>
  17. /// <param name="TableName">表名称</param>
  18. public TableNameAttribute(string TableName)
  19. {
  20. this._tablename = TableName;
  21. }
  22. }
  23. }
  24. }