DispatchProxyAsync icon indicating copy to clipboard operation
DispatchProxyAsync copied to clipboard

Create proxy with "typeof"

Open ludovicasa opened this issue 3 years ago • 0 comments

Hello,

I am trying to dynamically create proxies for a list of types (List<Type> from an assembly scan) but I could not find a way to use the generic DispatchProxyAsync.Create method.

Basically I am looking for a non generic version of the Create method, like: DispatchProxyAsync.Create(typeof(myType), typeof(myProxyType));

For example this is what has been done for the DispatchProxy class of the framework: NET 6 version (only generic method): https://github.com/dotnet/runtime/blob/release/6.0/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs NET 7 version with the new overload that takes types as parameters: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs

Do you have any idea?

ludovicasa avatar Dec 12 '22 14:12 ludovicasa