Mapping Validity check

May 18, 2011 at 1: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?

May 18, 2011 at 1:29 PM

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