示例#1
0
 public void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder)
 {
     foreach (var specification in _specifications)
     {
         specification.Apply(builder);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        /// <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);
        }
示例#4
0
 public HL7CopyTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder)
     : base(builder)
 {
     _reflector = new HL7EntityTranslateBuilderPropertyReflector <HL7CopyTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>, TResult, TInput, TSchema>();
 }
示例#5
0
 protected CopyTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder)
 {
     _builder = builder;
 }
示例#6
0
 public EntityMissingTranslateBuilderPropertyVisitor(IEntityTranslateBuilder <TResult, TInput, TSchema> builder)
     : base(builder)
 {
     _reflector = new EntityTranslateBuilderPropertyReflector <EntityMissingTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>, TResult, TInput, TSchema>();
 }
示例#7
0
 public abstract void Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder);
示例#8
0
        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);
        }
示例#9
0
 void IEntityTranslateSpecification <TResult, TInput, TSchema> .Apply(IEntityTranslateBuilder <TResult, TInput, TSchema> builder)
 {
     _specification.Apply(builder);
 }