Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Add ModelBindingContext.IsFirstChanceBinding and IsTopLevelObject #2697

Closed

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Jun 14, 2015

nits:

  • combine tests that are now duplicates
  • beef up coverage of some MutableObjectModelBinderTest cases

@dougbu
Copy link
Member Author

dougbu commented Jun 14, 2015

/cc @harshgMSFT @rynowak

This PR builds on #2695 and #2696. Technically, this PR is optional but it corrects some (corner case?) behaviours and simplifies the code.

public bool IsTopLevelObject { get; set; }

/// <summary>
/// Gets or sets an indication that a parent binder will make another binding attempt (e.g. fall back to the
Copy link
Member Author

Choose a reason for hiding this comment

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

s/parent binder/model binding system/

@dougbu
Copy link
Member Author

dougbu commented Jun 18, 2015

:shipit: from @rynowak

@dougbu dougbu force-pushed the dougbu/more.state.2445.II branch from 8be42f8 to f0ae34d Compare June 22, 2015 01:08
dougbu added 2 commits June 21, 2015 18:20
- cleanup duplicate code now that #2445 is fixed
- update unit tests using old `ModelBindingContext` setups
- fix (just) one integration test where `MutableObjectModelBinder` incorrectly calculated
  `isTopLevelObject` and returned a non-`null` model
- undo temporary changes in `BodyModelBinderTests` due to increased reliance on incorrect
  `isTopLevelObject` in #2445 fix

nits:
- combine tests that are now duplicates
- beef up coverage of some `MutableObjectModelBinderTest` cases
- "a parent binder" -> "the model binding system"
- remove unused `using`s
@dougbu dougbu force-pushed the dougbu/model.binding.cleanup branch from 37fd9d1 to 10a21db Compare June 22, 2015 01:42
@dougbu
Copy link
Member Author

dougbu commented Jun 24, 2015

a170a4e

@dougbu dougbu closed this Jun 24, 2015
@dougbu dougbu deleted the dougbu/model.binding.cleanup branch June 24, 2015 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants