Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more collection types + Able to set null value to nullable property + Value types will always be primitive #12

Merged
merged 7 commits into from
Jan 14, 2016

Conversation

chaowlert
Copy link
Collaborator

Sorry for having more than one topic in single pull request. This is from my code base when I used Mapster for a while.

  1. Support more collection types
    Current code base supports only array, List<>, generic interfaces such as IList<>, and ArrayList
    With this pull request, it will support all ICollection<> implementation, such as HashSet<>, ObservableCollection<>.
    And it also supports non-generic interfaces such as IList, ICollection, IEnumerable.
  2. Able to set null value to nullable property.
    Current code base will never set null value to nullable property.
    I think Mapper should map all possible values to target.
  3. Value types will always be primitive.
    All value types, such as TimeSpan, DateTimeOffset, even custom struct should always be primitive.
    Otherwise, it will error all cases when we map struct.
    This should reduce a lot of custom config added to primitive types.

eswann added a commit that referenced this pull request Jan 14, 2016
Support more collection types + Able to set null value to nullable property + Value types will always be primitive
@eswann eswann merged commit 85ecfe1 into MapsterMapper:master Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants