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

Add support for nested explicit wrappers #140

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

agocke
Copy link
Collaborator

@agocke agocke commented Sep 6, 2023

Sometimes you need to fully specify a wrapper type. This is most common for situations when you need a custom wrapper type, but that type is embedded inside an outer generic type (like a List) that needs its own wrapper. In this case, it's not enough to specify the outer wrapper (the List wrapper) or the inner wrapper (the custom wrapper) alone. You need the full composition.

The new WrapperSerialize and WrapperDeserialize properties on the GenerateSerialize, GenerateDeserialize, and GenerateSerde attributes can be used for this.

Sometimes you need to fully specify a wrapper type. This is most common
for situations when you need a custom wrapper type, but that type is
embedded inside an outer generic type (like a List) that needs its own
wrapper. In this case, it's not enough to specify the outer wrapper (the
List wrapper) or the inner wrapper (the custom wrapper) alone. You need
the full composition.

The new `WrapperSerialize` and `WrapperDeserialize` properties on the
GenerateSerialize, GenerateDeserialize, and GenerateSerde attributes can
be used for this.
@agocke agocke enabled auto-merge (squash) September 6, 2023 02:55
@agocke agocke merged commit 31a86da into serdedotnet:main Sep 6, 2023
1 check passed
@agocke agocke deleted the nested-explicit-wrappers branch September 6, 2023 03:10
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