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

Unable to proxy class with out argument #11

Open
nullpainter opened this issue Oct 3, 2019 · 1 comment
Open

Unable to proxy class with out argument #11

nullpainter opened this issue Oct 3, 2019 · 1 comment

Comments

@nullpainter
Copy link

Creating a proxy against a class with an out argument in any method fails with the following exception:

System.TypeInitializationException : The type initializer for 'SexyProxy.Proxy`1' threw an exception.
  ----> System.ArgumentException : Cannot get TypeToken for a ByRef type.

Is this a bug in sexy-proxy, or just a limitation of emitting code?

Example:

Proxy.CreateProxy<TestClass>(async invocation => await invocation.Proceed());
public class TestClass
{
    void Boom(object key, out string value) => value = null;
}
@nullpainter
Copy link
Author

Oh, I just see that PR #6 appears to resolve this. Do you have plans to merge this or equivalent?

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