Class GreaterThanZeroAttribute
Last update: 16.07.2025Namespace: VM.Models.Pre
Assembly: VM.Models.Pre.dll
This class implements attribute for Limit > 0.
[Aspect(Scope.Global)]
[AttributeUsage(AttributeTargets.Method)]
[Injection(typeof(GreaterThanZeroAttribute))]
public class GreaterThanZeroAttribute : ValidationAttribute
Inheritance
object ← Attribute ← ValidationAttribute ← GreaterThanZeroAttribute
Inherited Members
ValidationAttribute.CheckValidationCore(Attribute[], MethodBase, object[]), ValidationAttribute.ValidationCondition(ValidationAttribute, string, object), ValidationAttribute.ExecuteException(string), ValidationAttribute.Names
Extension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkedObjects
Constructors
GreaterThanZeroAttribute()
Initializes a new instance of the
public GreaterThanZeroAttribute()
GreaterThanZeroAttribute(params string[])
Initializes a new instance of the
public GreaterThanZeroAttribute(params string[] names)
Parameters
names string[]
The target names
Fields
__a$_instance
public static readonly GreaterThanZeroAttribute __a$_instance
Field Value
Methods
CheckValidation(MethodBase, object[], Attribute[])
Check validation.
[Advice(Kind.Before, Targets = Target.Any)]
public void CheckValidation(MethodBase method, object[] argument, Attribute[] triggers)
Parameters
method MethodBase
The method.
argument object[]
The argument.
triggers Attribute[]
The triggers
ExecuteException(string)
Execute exception.
protected override void ExecuteException(string name)
Parameters
name string
The argument name.
ValidationCondition(ValidationAttribute, string, object)
validation condition.
protected override bool ValidationCondition(ValidationAttribute attribute, string paramName, object argument)
Parameters
attribute ValidationAttribute
The attribute.
paramName string
The parameter name.
argument object
The argument.
Returns
The flag for success.