C# 클래스 MyTested.AspNetCore.Mvc.Utilities.Validators.AttributesValidator

Validator class containing attributes validation logic.
파일 보기 프로젝트 열기: ivaylokenov/MyTested.AspNetCore.Mvc

공개 메소드들

메소드 설명
ValidateAttributes ( IEnumerable attributes, BaseAttributesTestBuilder attributesTestBuilder, string>.Action failedValidationAction ) : void

Validation collection attribute based on attribute test builder.

ValidateNoAttributes ( IEnumerable attributes, string>.Action failedValidationAction ) : void

Validates whether the provided collection of attributes contains zero elements.

ValidateNumberOfAttributes ( IEnumerable attributes, string>.Action failedValidationAction, int withTotalNumberOf = null ) : void

Validates if any attributes are contained in the provided collection of attributes.

메소드 상세

ValidateAttributes() 공개 정적인 메소드

Validation collection attribute based on attribute test builder.
public static ValidateAttributes ( IEnumerable attributes, BaseAttributesTestBuilder attributesTestBuilder, string>.Action failedValidationAction ) : void
attributes IEnumerable Collection of attributes to validate.
attributesTestBuilder BaseAttributesTestBuilder Test builder containing attribute specific validation.
failedValidationAction string>.Action Action to call in case of failed validation.
리턴 void

ValidateNoAttributes() 공개 정적인 메소드

Validates whether the provided collection of attributes contains zero elements.
public static ValidateNoAttributes ( IEnumerable attributes, string>.Action failedValidationAction ) : void
attributes IEnumerable Collection of attributes to validate.
failedValidationAction string>.Action Action to call in case of failed validation.
리턴 void

ValidateNumberOfAttributes() 공개 정적인 메소드

Validates if any attributes are contained in the provided collection of attributes.
public static ValidateNumberOfAttributes ( IEnumerable attributes, string>.Action failedValidationAction, int withTotalNumberOf = null ) : void
attributes IEnumerable Collection of attributes to validate.
failedValidationAction string>.Action Action to call in case of failed validation.
withTotalNumberOf int Optional parameter specifying the exact number of expected attributes.
리턴 void