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.