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

Consolidate public extension method classes #801

Merged
merged 7 commits into from
Apr 7, 2019

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Apr 7, 2019

Public extension methods are spread out over way too many static classes, this PR rearranges them a little.

...as the other `ObsoleteMockExtensions` class already holds `Mock<T>`
extension methods, and those in `MockLegacyExtensions` can join them.
...and move them to `ObsoleteMockExtensions` at the same time. The
`[EditorBrowsable]` bug mentioned in the original comment is no longer
observable in a current version of Visual Studio (2017 / 15.9.10).
No need to have two separate classes. A distinction is already made at
the file level by separating obsolete stuff out into the `Obsolete`
directory.
Those are identical to the instance methods they forward to, so there
is no point in keeping them around.
@stakx stakx added this to the 4.11.0 milestone Apr 7, 2019
...to be in line with the usual convention of naming extension method
classes after the type that they extend.

Note that the class MUST remain in the `Moq.Protected` namespace.
@stakx stakx merged commit 486031e into devlooped:master Apr 7, 2019
@stakx stakx deleted the api-rectification branch April 7, 2019 17:49
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

1 participant