✅ [CodeGen] Determining Assignability of Types
Hi Guys!
Over the past days I dipped my feet a bit in code generation with the goal of writing a proxy generator that receives a "Proxy Template" (Class) from the target assembly and a "Target Class" that should be proxied.
I quickly realized that the proxy template should support at least two different methods, which the generator must use to build the proxy, namely because the difference of
I.e. I need one proxy template method that roughly looks like:
and another that handles
With this as a starting point, I already needed a way to figure out in the code generator which of the proxy template methods should be used to wrap any given function of the target class/class to proxy.
[POST CONTINUES IN NEXT MESSAGE]
Over the past days I dipped my feet a bit in code generation with the goal of writing a proxy generator that receives a "Proxy Template" (Class) from the target assembly and a "Target Class" that should be proxied.
I quickly realized that the proxy template should support at least two different methods, which the generator must use to build the proxy, namely because the difference of
Task and Task<T> return types.I.e. I need one proxy template method that roughly looks like:
and another that handles
Task because the return statement is invalid when awaiting:With this as a starting point, I already needed a way to figure out in the code generator which of the proxy template methods should be used to wrap any given function of the target class/class to proxy.
[POST CONTINUES IN NEXT MESSAGE]
