Skip to content
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

Update SetEach to avoid multiple enumerations #91

Closed
roryprimrose opened this issue May 4, 2020 · 1 comment
Closed

Update SetEach to avoid multiple enumerations #91

roryprimrose opened this issue May 4, 2020 · 1 comment

Comments

@roryprimrose
Copy link
Owner

If an IEnumerable<T> is passed to SetEach then the instance returned is the same IEnumerable. This would cause a potential multiple enumeration problem. In this case the code should use yield. If it is something other than strictly IEnumerable<T> then it should return the original parameter value.

@roryprimrose
Copy link
Owner Author

This has already been handled by SetEach converting to a List before running the enumerator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant