A simple helper class that allows you to easily manage multiple mappers that each have their purpose. For example, use this class if you have multiple mappers for update and create scenarios.
예제 #1
0
        public void CallingNonExistentProfileCreatesIt()
        {
            var profiles = new MapCollection();

              var result = profiles["create"].Map<DestinationType>(new SourceType { ID = 10 });

              Assert.AreEqual(10, result.ID);
        }
예제 #2
0
        public void SettingProfileSetsIt()
        {
            var profiles = new MapCollection();

              var mapper = new MemberMapper();

              profiles["create"] = mapper;

              Assert.AreEqual(mapper, profiles["create"]);
        }