BobbyCore数据库切换/EntityAttribute.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
namespace TbColAttribute
{
/// <summary>
/// 为元素添加验证信息的特性类
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class EntityAttribute : Attribute
{
/// <summary>
/// 验证类型
/// </summary>
private ValidateType _validateType;
/// <summary>
/// 最小长度
/// </summary>
private int _minLength;
/// <summary>
/// 最大长度
/// </summary>
private int _maxLength;
/// <summary>
/// 自定义数据源
/// </summary>
private string[] _customArray;
/// <summary>
/// 属性中文名称 验证失败使用
/// </summary>
private string _errorMes;
/// <summary>
/// 验证类型
/// </summary>
public ValidateType ValidateType
{
get { return this._validateType; }
}
/// <summary>
/// 最小长度
/// </summary>
public int MinLength
{
get { return this._minLength; }
set { this._minLength = value; }
}
/// <summary>
/// 最大长度
/// </summary>
public int MaxLength
{
get { return this._maxLength; }
set { this._maxLength = value; }
}
后面还有 29 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
