Support dynamic registration from open generic type#200
Support dynamic registration from open generic type#200
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hadashia/vcontainer/BeCZQEMCyDrYStHXQN76EX5aXLAt |
051c6f3 to
9d5269b
Compare
|
Since this approach is only making instances of the closed generic types using reflection it means it won't work with IL2CPP, right? It will only work if code generation is used since it will then generate the code that actually uses those types so they won't be missing in runtime. |
|
I decided to adopt this one. #367 MakeGenericType seems to work in recent Unity. See also the comments. |
#301
If the open generic type is registered, the closed generic type will be dynamically assembled at resolve time.
📝 Usage:
https://github.com/Cysharp/MessagePipe/blob/master/src/MessagePipe/ServiceCollectionExtensions.cs#L43-L102