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

Static Adapt methods now work as extension methods and fixed docs where 'OfType' should be 'ForType'. Also shows Enum -> string failure on compile with Explicit on. #15

Merged
merged 2 commits into from
Jan 21, 2016

Conversation

eric-swann-q2
Copy link
Contributor

Updated Adapt static methods to be extension methods on the source so the less terse notation can be used: var dto = product.Adapt(config);

Added a few tests for this and also fixed a problem in the documentation: 'OfType' should have been 'ForType' when using instance configuration.

@eric-swann-q2 eric-swann-q2 changed the title Added extension methods/fixed issue in docs with 'OfType' -> 'ForType' Added extension methods and fixed docs where 'OfType' should be 'ForType' Jan 20, 2016
@eric-swann-q2 eric-swann-q2 changed the title Added extension methods and fixed docs where 'OfType' should be 'ForType' Static Adapt methods now work as extension methods and fixed docs where 'OfType' should be 'ForType' Jan 20, 2016
@eric-swann-q2 eric-swann-q2 changed the title Static Adapt methods now work as extension methods and fixed docs where 'OfType' should be 'ForType' Static Adapt methods now work as extension methods and fixed docs where 'OfType' should be 'ForType'. Also shows Enum -> string failure on compile with Explicit on. Jan 20, 2016
@@ -312,6 +312,9 @@ internal TypeAdapterSettings GetMergedSettings(Type sourceType, Type destination
{
if (this.RequireExplicitMapping && mapType != MapType.InlineMap && !MapContext.HasContext)
{
if(sourceType.)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you did not intend to add this line. This PR is cool except this line, please remove.

@eswann eswann merged commit 44de4ad into MapsterMapper:master Jan 21, 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.

3 participants