修改命名空间
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.Common.Attributes;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
|
||||
public sealed class NotNullOrEmptyAttribute : ValidationAttribute
|
||||
{
|
||||
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
|
||||
{
|
||||
var b = value != null || (value is string str && !string.IsNullOrEmpty(str));
|
||||
return b ? ValidationResult.Success : new("输入内容不是数值。");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user