Support Complex Payload Types Through an IJobRegistration<TJob> interface #2
DCarlson12
started this conversation in
Ideas
Replies: 1 comment
|
This is fair. I'm going to think on some paths forward here. Thanks for the callout! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The
JobRegistration.Create<TJob, THandler>strategy for supporting jobs with types not supported by default seems like a misfit in the source-generated strategy. Could registration not be handled by introducing anIJobRegistration<TJob>interface that carries theJsonTypeInfo<TJob>in it and the source generator could utilize that to create theJobRegistration? The narrow scope of permissible default payload types seems quite heavy-handed and introduces unnecessary friction. I’d be hard pressed to believe that the use of non-default types and collections are deemed an exception rather than an overwhelmingly standard rule in payload shapes. This seems like pre-optimization in the face of utility.All reactions