public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { var mapper = new SingleSliceValueEntityProperty <TEntity, TValue>(builder.ImplementationType, Property.Name, Position, Factory); ITextSliceProvider <TEntity> provider = new ValueSliceProvider <TEntity, TValue>(Property, _valueFormatter); builder.Add(mapper, provider); }
public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { var property = new ValueArrayEntityProperty <TEntity, TValue>(builder.ImplementationType, Property.Name, Position, GetValue, _sliceFactory); ITextSliceProvider <TEntity> provider = new ValueArraySliceProvider <TEntity, TValue>(Property, _valueFormatter); builder.Add(property, provider); }
public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { IEntityMap <TEntityValue> entityMap = builder.GetEntityMap <TEntityValue>(); var mapper = new SingleSliceValueEntityProperty <TEntity, TEntityValue>(builder.ImplementationType, Property.Name, Position, x => Factory(x, entityMap)); ITextSliceProvider <TEntity> provider = new EntityValueSliceProvider <TEntity, TEntityValue>(Property, entityMap); builder.Add(mapper, provider); }
public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { ValueArrayFactory <TValue> factory = fragment => new EntityValueArray <TValue>(fragment, _valueConverter); var mapper = new ValueArrayEntityProperty <TEntity, TValue>(builder.ImplementationType, Property.Name, Position, factory, Single); ITextSliceProvider <TEntity> provider = new ValueArraySliceProvider <TEntity, TValue>(Property, _valueFormatter); builder.Add(mapper, provider); }
public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { IEntityMap <TEntityValue> entityMap = builder.GetEntityMap <TEntityValue>(); var property = new ValueListEntityProperty <TEntity, TEntityValue>(builder.ImplementationType, Property.Name, Position, x => new EntityValueList <TEntityValue>(x, entityMap), _sliceFactory); ITextSliceProvider <TEntity> provider = new ValueListSliceProvider <TEntity, TEntityValue>(Property, new EntityValueFormatter <TEntityValue>(entityMap)); builder.Add(property, provider); }
public override void Apply(IEntityMapBuilder <TEntity, TSchema> builder) { var mapper = new SingleSliceValueEntityProperty <TEntity, TValue>(builder.ImplementationType, Property.Name, Position, GetValue); // TODO will need formatter eventually cached,shared IValueFormatter <TValue> formatter = new ToStringValueFormatter <TValue>(); ITextSliceProvider <TEntity> provider = new ValueSliceProvider <TEntity, TValue>(Property, formatter); builder.Add(mapper, provider); }