UnitRangeAttribute
StockSharp.Messages
Bereichsbeschränkung für Einheitenwerte.
Erbt von: RangeAttribute
Implementiert: IValidator
Konstruktoren
UnitRangeAttribute
public UnitRangeAttribute(Unit min, Unit max)
unitRangeAttribute = UnitRangeAttribute(min, max)
Initialisiert eine neue Instanz von UnitRangeAttribute.
- min
- Mindestwert (einschließlich).
- max
- Maximalwert (einschließlich).
Eigenschaften
DisableNullCheck
public bool DisableNullCheck { get; set; }
value = unitRangeAttribute.DisableNullCheck
unitRangeAttribute.DisableNullCheck = value
Gets or sets a value indicating whether null checks should be disabled.
Methoden
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.
Rückgabe: True if the value is valid; otherwise, false.