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

Fix SetupAllProperties indexer regression & refactor accessor check methods for clarity #902

Merged
merged 4 commits into from
Aug 22, 2019

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Aug 22, 2019

Fixes #901.

 * Give them more precise names
 * Reduce code duplication
 * Reorder them into logical groups
 * Add missing methods for property check
 * Inline some single-use accessor check methods
 * Update call sites to use the new methods
@stakx stakx added this to the 4.13.0 milestone Aug 22, 2019
.Append(expression.Method.Name, 4);
if (expression.Arguments.Count > paramFrom)
{
builder.AppendCommaSeparated("[", expression.Arguments.Skip(paramFrom), AppendExpression, "]");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not introduced by this refactoring, but weird nonetheless: Why do angle brackets appear in the formatting of a property getter expression?

src/Moq/SetupCollection.cs Show resolved Hide resolved
@stakx stakx merged commit 27f89c5 into devlooped:master Aug 22, 2019
@stakx stakx deleted the accessor-check-methods branch August 22, 2019 21:17
@stakx stakx changed the title Fix SetupAllProperties indexer regression & refactor accessor check methods for clarify Fix SetupAllProperties indexer regression & refactor accessor check methods for clarity Aug 22, 2019
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.

Regression in 4.12.0: SetupAllProperties resets indexer setups
1 participant