-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Codebase: Make private service fields readonly #11011
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that private non-static fields should be prefixed by '_'. See 2. Naming notation for variables
of code style guidelines
This I am not sure. This notation has not been enfored for a while on the project (at least for the few months I have been active here). If we decide to enforce it, it will ask for a real effort to refactor the whole project in this direction. A decision should be taken regarding this in a proper discussion. |
Can you resolve the merge conflicts? |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are also other services to be changed:
IFileTagsSettingsService
ofFileTagsService
IFileTagsSettingsService
ofAboutViewModel
src/Files.App/Filesystem/FilesystemOperations/ShellFilesystemOperations.cs
Outdated
Show resolved
Hide resolved
src/Files.App/Filesystem/FilesystemOperations/ShellFilesystemOperations.cs
Outdated
Show resolved
Hide resolved
That should be everything (according to the quick Visual Studio search I did) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolved / Related Issues
Items resolved / related issues by this PR.
private T Service { get; } = Ioc.Default.GetRequiredService<T>()
byreadonly
field #11008 (if Code Quality: Made private UserSettingsService property into a readonly field #11009 is merged, as this doesn't modify UserSettingsService)Validation
How did you test these changes?