예제 #1
0
        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)
        {
            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)
        {
            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);
        }