-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Search] Add missing property when cloning SearchOptions
#27582
Conversation
Copy all properties using reflection to alleviate missing some properties being copied
/azp run net - search - tests |
/azp run net - search - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Issue #27549 |
This is the category of issues I am trying to kill with this approach. It has happened a few times now. The current issue is for an old property, so the bug has existed for a while. |
/azp run net - search - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
cc: @tg-msft |
It looks like these are all value types, would a MemberwiseClone work? |
Another idea would be to just do the reflection in the unit test, and keep the production code up to date by hand. This way you will catch future missing properties automatically in the test, but won't have to use reflection in production code. |
What would the test check? The count of the properties? |
The test could check that each property on the source is equal to the corresponding property on the destination. |
SearchOptions
SearchOptions
API change check for API changes are not detected in this pull request for |
Copy all properties using reflection to alleviate the issue of missing some properties in the copy code.