UnitRangeAttribute

StockSharp.Messages

单位值的幅度限制 。

继承自: RangeAttribute

实现: IValidator

构造函数

UnitRangeAttribute
public UnitRangeAttribute(Unit min, Unit max)
unitRangeAttribute = UnitRangeAttribute(min, max)

初始化了 & ##UnitRangeAttribute+#的新实例.

min
最低价值(含).
max
最大值( 包括) 。

属性

DisableNullCheck
public bool DisableNullCheck { get; set; }
value = unitRangeAttribute.DisableNullCheck
unitRangeAttribute.DisableNullCheck = value
Max
public Unit Max { get; }
value = unitRangeAttribute.Max

最大值 。

Min
public Unit Min { get; }
value = unitRangeAttribute.Min

最低值。

方法

IsValid
public override bool IsValid(object value)
result = unitRangeAttribute.IsValid(value)