-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Code Quality: Made private UserSettingsService property into a readonly field #11009
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
Code Quality: Made private UserSettingsService property into a readonly field #11009
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.
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.
Overall, LGTM. I think you should remove braces of single-line ifs
Edit. I think that private non-static fields should be prefixed by '_'. See 2. Naming notation for variables
of code style guidelines
From what I see, this rule is not enforced anymore, most of the code base doesn't use it. If we are to do it, that's gonna be a huge cost. |
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
@QuaintMako Can you fix the compilation error? |
Line 135 of FoldersViewModel.cs |
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.
LGTM
a791d3f
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, but can you remove the FilesLauncher.exe, I don't think it's needed.
@QuaintMako can you resolve the merge conflicts? |
Resolved / Related Issues
private T Service { get; } = Ioc.Default.GetRequiredService<T>()
byreadonly
field #11008What has been done
private IUserSettingsService UserSettingsService { get; } = Ioc.Default.GetRequiredService<IUserSettingsService>();
byprivate readonly IUserSettingsService userSettingsService = Ioc.Default.GetRequiredService<IUserSettingsService>();
if
Validation
How did you test these changes?