Exemple #1
0
 Destination <object> ITypeConverter <OtherSource <T>, Destination <object> > .Convert(
     OtherSource <T> source,
     Destination <object> dest,
     ResolutionContext context
     )
 {
     return(ClosedDestinationViaOpenSource);
 }
Exemple #2
0
 OtherDestination <T> ITypeConverter <OtherSource <T>, OtherDestination <T> > .Convert(
     OtherSource <T> source,
     OtherDestination <T> dest,
     ResolutionContext context
     )
 {
     return(SomeOtherDestination);
 }
Exemple #3
0
        protected override void Because_of()
        {
            var source = new OtherSource
            {
                Children = new Collection <Child> {
                    new OtherChild(), new OtherChild()
                }
            };

            _dest = Mapper.Map <Source, Dest>(source);
        }
Exemple #4
0
 protected override void Because_of()
 {
     var source = new OtherSource
     {
         Children = new Collection<Child>
         {
             new OtherChild(),
             new OtherChild()
         }
     };
     _dest = Mapper.Map<Source, Dest>(source);
 }
Exemple #5
0
            public void Should_apply_converters()
            {
                var source = new Source {
                    Value = 1,
                };
                var otherSource = new OtherSource {
                    Value = 2,
                };

                var dest      = Mapper.Map <Source, Dest>(source);
                var otherDest = Mapper.Map <OtherSource, OtherDest>(otherSource);

                dest.Value.ShouldBe("00000001");
                otherDest.Value.ShouldBe("00000002");
            }