Esempio n. 1
0
		public PropertyValidatorContext(ValidationContext parentContext, PropertyRule rule, string propertyName) {
			ParentContext = parentContext;
			Rule = rule;
			PropertyName = propertyName;
			_propertyValueContainer = new Lazy<object>( () => {
				var value = rule.PropertyFunc(parentContext.InstanceToValidate);
				if (rule.Transformer != null) value = rule.Transformer(value);
				return value;
			});
		}