public void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) { foreach (var specification in _specifications) { specification.Apply(builder); } }
public override void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) { var translator = new SetPropertyTranslator <TResult, TProperty, TInput, TSchema>(builder.ImplementationType, ResultPropertyInfo, new StaticTranslatePropertyProvider <TProperty, TInput, TSchema>(_propertyValue)); builder.Add(ResultPropertyInfo.Name, translator); }
/// <summary> /// Replace all existing translators for the property with the specified translator /// </summary> /// <param name="builder"></param> /// <param name="propertyName"></param> /// <param name="translator"></param> /// <typeparam name="TResult"></typeparam> /// <typeparam name="TInput"></typeparam> /// <typeparam name="TSchema"></typeparam> public static void Replace <TResult, TInput, TSchema>(this IEntityTranslateBuilder <TResult, TInput, TSchema> builder, string propertyName, IPropertyTranslator <TResult, TInput, TSchema> translator) where TResult : TSchema where TInput : TSchema where TSchema : Entity { builder.Clear(propertyName); builder.Add(propertyName, translator); }
public HL7CopyTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) : base(builder) { _reflector = new HL7EntityTranslateBuilderPropertyReflector <HL7CopyTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>, TResult, TInput, TSchema>(); }
protected CopyTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) { _builder = builder; }
public EntityMissingTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) : base(builder) { _reflector = new EntityTranslateBuilderPropertyReflector <EntityMissingTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>, TResult, TInput, TSchema>(); }
public abstract void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder);
public override void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) { var translator = new CopyValuePropertyTranslator <TResult, TValue, TInput, TSchema>(builder.ImplementationType, ResultPropertyInfo, InputPropertyInfo); builder.Add(ResultPropertyInfo.Name, translator); }
void IEntityTranslateSpecification <TResult, TInput, TSchema> .Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder) { _specification.Apply(builder); }