public class NoNullsInjection : ConventionInjection
{
protected override bool Match(ConventionInfo c)
{
return c.SourceProp.Name == c.TargetProp.Name
&& c.SourceProp.Value != null;
}
}
Usage:
target.InjectFrom(new NoNullsInjection(), source);
No comments:
Post a Comment
Comments are very welcome but are moderated to prevent spam.