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

Implement InternalOrPublicFieldToProperty analyzer #6

Closed
Vannevelj opened this issue May 3, 2015 · 1 comment
Closed

Implement InternalOrPublicFieldToProperty analyzer #6

Vannevelj opened this issue May 3, 2015 · 1 comment
Milestone

Comments

@Vannevelj
Copy link
Owner

The only fields an application should have are private and protected. public and internal fields should be a property instead. The only exception here is when they are const or static readonly.

This stems from the idea of encapsulation: outside members should access private and protected fields through a method to allow for validation.

Provide a CodeFix which makes the field private and adds a public or internal property, depending on what the field was defined as.

@Vannevelj Vannevelj self-assigned this Jun 1, 2015
@Vannevelj
Copy link
Owner Author

Part of this code fix includes renaming the field ( #25 ) so that will have to be done first.

@Vannevelj Vannevelj mentioned this issue Jun 3, 2015
Vannevelj added a commit that referenced this issue Jun 3, 2015
@Vannevelj Vannevelj removed their assignment Jun 3, 2015
@Vannevelj Vannevelj added this to the v1.6.0 milestone Jun 3, 2015
Hosch250 added a commit that referenced this issue Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant