C# 클래스 FluentValidation.Validators.ScalePrecisionValidator

Allows a decimal to be validated for scale and precision. Scale would be the number of digits to the right of the decimal point. Precision would be the number of digits. It can be configured to use the effective scale and precision (i.e. ignore trailing zeros) if required. 123.4500 has an scale of 4 and a precision of 7, but an effective scale and precision of 2 and 5 respectively.
상속: PropertyValidator
파일 보기 프로젝트 열기: JeremySkinner/FluentValidation

공개 메소드들

메소드 설명
ScalePrecisionValidator ( int scale, int precision ) : System
ScalePrecisionValidator ( int scale, int precision, string errorMessage ) : System
ScalePrecisionValidator ( int scale, int precision, string errorMessageResourceName, Type errorMessageResourceType ) : System

보호된 메소드들

메소드 설명
IsValid ( PropertyValidatorContext context ) : bool

비공개 메소드들

메소드 설명
GetBits ( decimal Decimal ) : System.UInt32[]
GetMantissa ( decimal Decimal ) : decimal
GetPrecision ( decimal Decimal ) : int
GetScale ( decimal Decimal ) : int
GetUnsignedScale ( decimal Decimal ) : uint
Init ( int scale, int precision ) : void
NumTrailingZeros ( decimal Decimal ) : uint

메소드 상세

IsValid() 보호된 메소드

protected IsValid ( PropertyValidatorContext context ) : bool
context PropertyValidatorContext
리턴 bool

ScalePrecisionValidator() 공개 메소드

public ScalePrecisionValidator ( int scale, int precision ) : System
scale int
precision int
리턴 System

ScalePrecisionValidator() 공개 메소드

public ScalePrecisionValidator ( int scale, int precision, string errorMessage ) : System
scale int
precision int
errorMessage string
리턴 System

ScalePrecisionValidator() 공개 메소드

public ScalePrecisionValidator ( int scale, int precision, string errorMessageResourceName, Type errorMessageResourceType ) : System
scale int
precision int
errorMessageResourceName string
errorMessageResourceType System.Type
리턴 System