1

I am using Value Injecter to map DTO->VM and vice versa.

Since all models and DTOs are still very much under development, I was wondering if there is a way to output the source object's property names/values that were NOT mapped to the target object, so I can verify the names of the properties match?

Thank you.

John
  • 3,591
  • 8
  • 44
  • 72
  • what do you mean by: "output the properties in an object" – Omu Sep 01 '15 at 12:38
  • @Omu I meant to output the source's property names that were not mapped to the target, for debugging purposes via Debug.WriteLine(...) – John Sep 01 '15 at 15:31
  • you could do that in a unit test by checking the values manually, if it has the same value then probably it wasn't set (it might have been set but with the same value) – Omu Sep 01 '15 at 16:29
  • @Omu thanks, and there is no way to do this "on the fly"? By the way, I've seen a sample "AreEqual" injection that checks if the property values are equal in SetValue(). I would need the opposite. Thanks again. – John Sep 01 '15 at 17:12
  • maybe use the clone injection to create a copy, map/inject, and after use a modified areequal which would output properties that aren't equal – Omu Sep 01 '15 at 22:21

0 Answers0