Mapping Validity check

May 18, 2011 at 2:09 PM

Hi I want to map two classes with identical properties like this:

 

IValueInjecter valueInjecter = new ValueInjecter();

valueInjecter.Inject(a, b);

Is there a way to tell ValueInjector to throw an exception if it doesn't find every property in B also in A, or is there any other way to know this?

Coordinator
May 18, 2011 at 2:29 PM

no it will not do this, but you could write an injection that will do this check