Repository navigation
AddParams(x) sends the members of the runtime type when x is typed object - #90
Merged
Merged
Conversation
…d object A variable typed object, or the result of a Func<T, object>, used to send nothing because it has no members of its own. AddParams now uses the members of the object's runtime type, found once per type and remembered. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AddParams(x)reads the members of the static type ofx. A variable typedobject, or the result of aFunc<T, object>, has no members of its own, so it silently sent no parameters.This change makes
AddParams<object>use the members of the object's runtime type (a boxed anonymous object, for example). The members of each type are found once and remembered, so repeated calls cost no extra reflection. Every other static type behaves as before, and the XML remarks say so.Tests:
ParameterNameAddParamsTestsgains 8 tests (the 6 edited lines replace the old "an object variable sends nothing" expectations). Release and Debug: 8745 passed, 0 failed; build 0 warnings, 0 errors; docs samples 86 checks pass; DocFX 0 warnings; style and analyzers 0 findings.🤖 Generated with Claude Code