Correct order of ExpressionBinders #1890

Merged
merged 1 commit into from Jan 5, 2017

Projects

None yet

3 participants

@roblugt
roblugt commented Jan 5, 2017

The order of the list of IExpressionBinders in ExpressionBuilder.cs is important because the first matching ExpressionBinder is selected. When a custom expression binder is provided in the user's configuration, this should be used in preference to any of the built-in binders. Prior to this fix the NullableExpresisonBinder would indicate a match if the destination type was of type System.Nullable<> Fixes #1879

Also added a unit test to demonstrate the bug.

@roblugt roblugt changed the title from Correct order of ExpressionBinders #1879 to Correct order of ExpressionBinders Jan 5, 2017
@TylerCarlson1

Looks good

@jbogard jbogard added the Bug label Jan 5, 2017
@jbogard jbogard added this to the vNext milestone Jan 5, 2017
@jbogard
jbogard approved these changes Jan 5, 2017 View changes
@jbogard jbogard merged commit fde5637 into AutoMapper:master Jan 5, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@roblugt roblugt deleted the roblugt:CorrectOrderOfExpressionBinders branch Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment