Skip to content

AddParams(x) sends the members of the runtime type when x is typed object - #90

Merged
electricessence merged 1 commit into
masterfrom
split/03-addparams-object
Nov 9, 2026
Merged

electricessence merged 1 commit into
masterfrom
split/03-addparams-object

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

AddParams(x) reads the members of the static type of x. A variable typed object, or the result of a Func<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: ParameterNameAddParamsTests gains 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

…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>
@electricessence
electricessence merged commit 8e8be8e into master Nov 9, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant