Method IncludeMembers
- Namespace
- Mapperion
- Assembly
- Mapperion.dll
IncludeMembers(params Expression<Func<TSource, object?>>[])
Names source members whose own maps to this destination fill in whatever this map leaves unresolved, which is how one destination is built out of several nested source objects.
IMappingExpression<TSource, TDestination> IncludeMembers(params Expression<Func<TSource, object?>>[] members)
Parameters
membersExpression<Func<TSource, object>>[]Source members, each a plain member access such as
s => s.Inner.
Returns
- IMappingExpression<TSource, TDestination>
This expression, for chaining.
Remarks
This map is looked at first: anything it configures explicitly, and anything its own conventions resolve, wins. Only members still without a source are offered to the included members, in the order given here, and the first one that has something to say provides it. A member the included map ignores counts as having nothing to say.
A map declared for the included type is used when there is one, so its renames and converters carry over. When there is none, the member is matched against the included type by the same conventions as anywhere else. A null included member leaves the members it would have filled at their default.
Exceptions
- ArgumentNullException
members, or one of its entries, is null.- MapperConfigurationException
An entry is not a chain of member accesses.