Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create proxy with "typeof" #2

Open
ludovicasa opened this issue Dec 12, 2022 · 0 comments
Open

Create proxy with "typeof" #2

ludovicasa opened this issue Dec 12, 2022 · 0 comments

Comments

@ludovicasa
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant