C# 클래스 Swashbuckle.Annotations.SwagValidator

Validates the attribute tag validations declared on the class
파일 보기 프로젝트 열기: BenjaminAdams/Swashbuckle-blue

공개 메소드들

메소드 설명
TryValidate ( object input, string &errorMessage, bool outputJsonPayload = false ) : bool

Validates the attribute tag validations declared on the class. Returns false if validation rules are not met and returns the error message in the errorMessage (out) parameter

Validate ( object input, bool outputJsonPayload = false ) : bool

Validates the attribute tag validations declared on the class. Throws an ValidationException if any validation rules are not met

비공개 메소드들

메소드 설명
CheckDefinedExAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void

Checks the Defined attribute.

CheckList ( object input, bool outputJsonPayload = false ) : bool
CheckListProperty ( object input, PropertyInfo prp, bool outputJsonPayload = false ) : void
CheckMaxLengthAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void
CheckMinLengthAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void
CheckRangeAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void
CheckRegularExpressionAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void

Checks the Defined attribute.

CheckRequiredAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void
CheckStringLengthAttribute ( PropertyInfo property, object input, bool outputJsonPayload ) : void
IsPrimitiveType ( object myObject ) : bool
ObjReqChecker ( object input, PropertyInfo prp, bool outputJsonPayload = false ) : void

메소드 상세

TryValidate() 공개 정적인 메소드

Validates the attribute tag validations declared on the class. Returns false if validation rules are not met and returns the error message in the errorMessage (out) parameter
public static TryValidate ( object input, string &errorMessage, bool outputJsonPayload = false ) : bool
input object The object you wish to validate
errorMessage string The error message
outputJsonPayload bool If you want the error message to contain the values in the object we are validating
리턴 bool

Validate() 공개 정적인 메소드

Validates the attribute tag validations declared on the class. Throws an ValidationException if any validation rules are not met
public static Validate ( object input, bool outputJsonPayload = false ) : bool
input object The object you wish to validate
outputJsonPayload bool If true will output the contents of input payload in the exception
리턴 bool