-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Mark PowerShellAssemblyLoadContextInitializer with static modifier #13874
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
Mark PowerShellAssemblyLoadContextInitializer with static modifier #13874
Conversation
@xtqqczze I don't see the change. |
The removed constructor is the implicit parameterless constructor. |
|
What is a benefit of the change? |
|
It is a fix for CA1822: Mark members as static. Documentation categorizes this as a performance rule, but I would add it is also a possible correctness issue: we should not allow creation of an instance of |
Correct me if I'm wrong, but the only this could be breaking is if someone attempts to create an instance of
|
|
Oh, sorry. For some reason I thought that it was an instance method. :) Please ignore my previous post. |
PR Summary
Breaking change: this change removes the implicit public constructor for
PowerShellAssemblyLoadContextInitializer.Fix CA1822: Mark members as static.
Justification:
PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContextPR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.