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
Convert SessionStateScopeEnumerator
to struct
#15846
base: master
Are you sure you want to change the base?
Convert SessionStateScopeEnumerator
to struct
#15846
Conversation
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
Do we need to audit usages of the enumerator to ensure this won't cause issues in code areas that access the enumerator directly, if there are any? |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
How do you mean "access the enumerator directly"? Like this? PowerShell/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs Lines 54 to 55 in 6588373
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? |
I'm not sure this change is worthwhile unless the enumerator can be refactored so that it is a ref struct, converting to draft. |
I don't understand. Using struct for enumerator is best practice. Roslyng generates optimal code for this. |
Fix HLQ006: GetEnumerator() and GetAsyncEnumerator() should return an instance of a value-typed enumerator