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

Feature: Generic Context for types #53

Closed
Washi1337 opened this issue Apr 1, 2020 · 0 comments
Closed

Feature: Generic Context for types #53

Washi1337 opened this issue Apr 1, 2020 · 0 comments

Comments

@Washi1337
Copy link
Owner

Summary:
Generic types and methods use instances of the GenericParameterSignature to reference type parameters. When instantiated, these signatures are at runtime replaced with the type arguments of the type or method instantiation. Therefore, for better analysis of the .NET metadata, it can is useful to obtain the type argument as was provided in the instantiation context.

Suggested syntax:

var context = new GenericContext(genericTypeInstance, genericMethodInstance);
GenericParameterSignature parameter = ...;
TypeSignature typeArgument = context.GetTypeArgument(parameter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant