public ValidationResult(MemberInfo property, string message, ValidationLevelType level, object target, IEnumerable <ValidationResult> nestedValidationResults) { _property = property; _message = message; _target = target; NestedValidationResults = nestedValidationResults ?? new List <ValidationResult>(); Level = level; }
public ValidationResult(MemberInfo property, string message, ValidationLevelType level, object target, IEnumerable<ValidationResult> nestedValidationResults) { _property = property; _message = message; _target = target; NestedValidationResults = nestedValidationResults; Level = level; }
public ValidationResult(MemberInfo property, string errorMessage, ValidationLevelType level, object target) { _property = property; _message = errorMessage; _target = target; NestedValidationResults = new List <ValidationResult>(); Level = level; }
public ValidationResult(MemberInfo property, string errorMessage, ValidationLevelType level, object target) { _property = property; _message = errorMessage; _target = target; NestedValidationResults = new List<ValidationResult>(); Level = level; }
public RuleValidatorContext(object instance, string propertyName, object propertyValue, ValidationLevelType level, MemberInfo propertyInfo, RuleValidatorContext parentContext) { Instance = instance; PropertyName = propertyName; PropertyValue = propertyValue; PropertyInfo = propertyInfo; Parent = parentContext; Level = level; }
public RuleValidatorContext(object instance, PropertyValidator validator, RuleValidatorContext parentContext) { PropertyValue = validator.GetValueForProperty(instance); if (validator.PropertyNameOverride == null) { SelectPropertyName(instance, validator); } else { PropertyName = validator.PropertyNameOverride; } PropertyInfo = validator.PropertyInfo; Parent = parentContext; Instance = instance; Level = validator.Level; }
private void set_validation_level() { var name = this.GetType().Name.to_lower(); if (name.EndsWith("requirement")) { ValidationLevel = ValidationLevelType.Requirement; } else if (name.EndsWith("suggestion")) { ValidationLevel = ValidationLevelType.Suggestion; } else if (name.EndsWith("note")) { ValidationLevel = ValidationLevelType.Note; } else { ValidationLevel = ValidationLevelType.Guideline; } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { ReportValidationItemModel validationItem = (ReportValidationItemModel)value; ValidationLevelType level = ReportValidationBusiness.ValidationTypeByMessage[validationItem.WorkScheduleValidationType].Level; switch (level) { case ValidationLevelType.ERROR: return(DELETE_IMAGE_PATH); case ValidationLevelType.WARNING: return(WARNING_IMAGE_PATH); case ValidationLevelType.VALIDATED: return(VALIDATED_IMAGE_PATH); default: return(DEFAULT_IMAGE_PATH); } }
public ValidationMessage(string propertyName, string errorMsg, ValidationLevelType validationLevel = ValidationLevelType.Error) { PropertyName = propertyName; ErrorMessage = errorMsg; ValidationLevel = validationLevel; }
public PackageValidationResult(bool validated, string validationFailureMessage, ValidationLevelType validationLevel) { Validated = validated; ValidationFailureMessage = validationFailureMessage; ValidationLevel = validationLevel; }
public void Add(string propertyName, string errorMessage, ValidationLevelType validationLevel = ValidationLevelType.Error) { Add(new ValidationMessage(propertyName, errorMessage, validationLevel)); }
private static List <string> GetReportedWorkScheduleIds(ReportValidationModel reportValidationModel, ValidationLevelType validationType) { List <string> rowsWithErrors = reportValidationModel.GetWorkScheduleIds( ReportValidationBusiness.WorkScheduleValidationTypeMessageList.Where( ws => ws.Level == validationType).Select(ws => ws.ValidationType).ToList <WorkScheduleValidationType>()); return(rowsWithErrors); }
public WorkScheduleValidationTypeMessage(WorkScheduleValidationType validationType, ValidationLevelType level, string message) { _validationType = validationType; _level = level; _message = message; }