Skip to content

Add an easy way to register proxies#321

Merged
agocke merged 4 commits intoserdedotnet:mainfrom
agocke:proxy-register
Mar 25, 2026
Merged

Add an easy way to register proxies#321
agocke merged 4 commits intoserdedotnet:mainfrom
agocke:proxy-register

Conversation

@agocke
Copy link
Copy Markdown
Collaborator

@agocke agocke commented Mar 23, 2026

We already have a mechanism for selecting proxies -- SerdeTypeOptions or SerdeMemberOptions. However, there are two downsides.

First, the proxy is meant to match the type of the member exactly. This can get very verbose if the only thing that's interesting in the proxy is nested inside a type substitution.

Second, there's no way to automatically use a proxy for all members in a type.

The new UseProxy feature adds an easy way to pick out individual proxies and reduce boilerplate.

Thanks to @Deficuet for the initial implementation here.

Deficuet and others added 3 commits March 22, 2026 21:38
Follow the existing SerdeMemberOptions pattern of separate properties
instead of a SerdeUsage flags enum. This keeps SerdeUsage internal to
the generator where it was originally defined.
@agocke agocke changed the title Add an easy way for registering proxies Add an easy way to register proxies Mar 23, 2026
@agocke agocke merged commit f5a68a7 into serdedotnet:main Mar 25, 2026
1 check 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.

2 participants