/// <summary> /// Gets the data annotations attribute used to apply the specified configuration. /// </summary> /// <param name="configuration">The configuration.</param> /// <returns>The attribute.</returns> public string Attribute(IAttributeConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } return(Attribute(configuration.GetAttributeBody(this))); }
public ObjectValidations(IAttributeConfiguration <TSource> provider) { if (provider == null) { throw new ArgumentNullException(nameof(provider)); } _provider = provider; }
public PropertyValidations(IAttributeConfiguration <TSource> provider, Expression <Func <TSource, TProperty> > property) { _provider = provider; _property = property; }
/// <summary> /// Gets the data annotations attribute used to apply the specified configuration. /// </summary> /// <param name="configuration">The configuration.</param> /// <returns>The attribute.</returns> public string Attribute(IAttributeConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } return Attribute(configuration.GetAttributeBody(this)); }
public static IObjectValidations <TSource> Validations <TSource>( this IAttributeConfiguration <TSource> provider) { return(new ObjectValidations <TSource>(provider)); }
public static IPropertyValidations <TSource, TProperty> ValidationsFor <TSource, TProperty>( this IAttributeConfiguration <TSource> provider, Expression <Func <TSource, TProperty> > property) { return(new PropertyValidations <TSource, TProperty>(provider, property)); }