Commit f5a68a7
authored
Add an easy way to register proxies (#321)
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.File tree
33 files changed
+1138
-64
lines changed- src
- generator
- serde
- json/newreader
- test
- Serde.Generation.Test
- test_output/ProxyTests.SerdeMemberOptionsTakesPrecedenceOverUseProxy
- Serde.Test
- generated/SerdeGenerator/Serde.SerdeImplRoslynGenerator
33 files changed
+1138
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| |||
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
270 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
| |||
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
282 | | - | |
| 287 | + | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
| |||
0 commit comments