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

Support generic methods in the ResourceProxyBuilder #343

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Toxantron
Copy link
Member

Resource interfaces with generic with generic methods or properties can currently not be proxied. We noticed that when we accessed simulated drivers that also implement IMessageDriver<object>.

Defining generic methods (return types, parameters, ...) with System.Emit is much more complicated than non generic definitions. On the other hand we didn't need this for several years now and even in the case above we only noticed it by accident, not because the simulated requires a generic interface to work.

Decision:

  • We keep this PR as a starting point and for future discussion, if the feature is required
  • We filter any generic interfaces in the proxy definition and assume they are only used internally
  • Requesting a generic type through the facade gives a NotSupportedException

References to pick up later:

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

Successfully merging this pull request may close these issues.

2 participants