UnitRangeAttribute
StockSharp.Messages
Restrição de alcance para valores unitários.
Herda de: RangeAttribute
Implementa: IValidator
Construtores
UnitRangeAttribute
public UnitRangeAttribute(Unit min, Unit max)
unitRangeAttribute = UnitRangeAttribute(min, max)
Inicializa uma nova instância do UnitRangeAttribute.
- min
- Valor mínimo (inclusive).
- max
- Valor máximo (inclusive).
Propriedades
DisableNullCheck
public bool DisableNullCheck { get; set; }
value = unitRangeAttribute.DisableNullCheck
unitRangeAttribute.DisableNullCheck = value
Gets or sets a value indicating whether null checks should be disabled.
Métodos
IsValid
public override bool IsValid(object value)
result = unitRangeAttribute.IsValid(value)
Validates the specified value by converting it and applying the custom validation.
- value
- The value to validate.
Retorna: True if the value is valid; otherwise, false.