Esempio n. 1
0
 protected override void ConfigureCustomMapping(MapperConfiguration <Foo, Bar> configuration)
 {
     configuration.Map(target => target.likeA).From(foo => foo.A);
     configuration.Map(target => target.likeB).From(foo => foo.B);
     configuration.Map(target => target.likeC).From(foo => foo.C);
     configuration.Map(target => target.CurrentDateTime).ByIgnoring();
     configuration.Map(target => target.SomeString).ByInvoking((target, source) => target.SetSomeString(source.SomeString));
     configuration.AddCustomActionDelegate((bar, foo) => bar.SetDirty());
     configuration.Map(target => target.CoordinateX)
     .And(target => target.CoordinateY)
     .And(target => target.CoordinateZ)
     .ByInvoking((bar1, foo1) => bar1.SetCoordinates(9, 8, 7));
     configuration.Map(target => target.ToIgnoreChain1)
     .And(target => target.ToIgnoreChain2)
     .And(target => target.ToIgnoreChain3)
     .ByIgnoring();
     configuration.Map(target => target.likeRefType).ByDelegatingTo(foo2 => foo2.RefType, _refTypeMapper);
 }