Ignore properties set to default<T>

Jul 7, 2010 at 11:10 PM
What I'd like to do is for properties that are nullable have a mechanism where if thats not provided, it wont automatically null out the fields on the second object the data is being mapped to. I know I can substitute values in, but I dont see that I can get at the to object to grab its value as the value I want it to set to. Just curious if this is already there and I am missing frm documentation, or if it would be easy to implement.
Coordinator
Jul 10, 2010 at 6:10 AM
Hi ronnyek. Take a look on FilterValues method. It cancels fields mapping basing on their values
Jul 13, 2010 at 6:52 PM
I was unable to find any such fields... I understand lambdas but gotta say the custom configurations are not clicking for me. Would it be possible to get an example of what you mean? Also, if I am creating a custom mapper... and valuegetter is passing in an object of user type, how can I get at the individual properties of that obj? Eg, return FilterOperations( from, to, ReflectionUtils .GetPublicFieldsAndProperties(to) .Select( m => (IMappingOperation)new DestWriteOperation { Destination = new MemberDescriptor(m), Getter = (ValueGetter<object>) ( (value, state) =>... <...> Value is the original object each and every time it runs through that... but theres no way to get the value of object.<m.name>. Appreciate your response. At this point,