public SetValuePropertySpecification(PropertyInfo property, SetValueProvider <TValue> valueProvider) : base(property, 0) { _valueProvider = valueProvider; _valueConverter = new SetValueConverter <TValue>(valueProvider); SetParent(); }
public SetValuePropertyTranslator(Type implementationType, PropertyInfo entityPropertyInfo, PropertyInfo inputPropertyInfo, SetValueProvider <TInput, TSchema, TPropertyEntity> valueProvider) { _valueProvider = valueProvider; _propertyName = entityPropertyInfo.Name; _property = new WriteProperty <TEntity, Value <TPropertyEntity> >(implementationType, _propertyName); _inputProperty = new ReadOnlyProperty <TInput, Value <TPropertyEntity> >(inputPropertyInfo); }
public SetValueConverter(SetValueProvider <TValue> valueProvider) { _valueProvider = valueProvider; }
public SetValuePropertyTranslatorSpecification(Expression <Func <TResult, Value <TValue> > > propertyExpression, SetValueProvider <TInput, TSchema, TValue> valueProvider) : base(propertyExpression) { _valueProvider = valueProvider; }
public static void Set <TResult, TEntity, TSchema, T>(this IEntityTranslatorConfigurator <TResult, TEntity, TSchema> configurator, Expression <Func <TResult, Value <T> > > propertyExpression, SetValueProvider <TEntity, TSchema, T> valueProvider) where TSchema : Entity where TEntity : TSchema where TResult : TSchema { var specification = new SetValuePropertyTranslatorSpecification <TResult, T, TEntity, TSchema>(propertyExpression, valueProvider); configurator.Add(specification); }