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

Assembly EntryPoint #31

Closed
dashne opened this issue Jan 29, 2020 · 3 comments
Closed

Assembly EntryPoint #31

dashne opened this issue Jan 29, 2020 · 3 comments
Labels

Comments

@dashne
Copy link

dashne commented Jan 29, 2020

how to get Method EntryPoint from MethodDefinition ?

@Washi1337
Copy link
Owner

Not sure what you're referring to here. Can you please elaborate?

@dashne
Copy link
Author

dashne commented Jan 31, 2020

Sorry,My Question was : how to get Assembly EntryPoint from MethodDefinition ?, like Mono cecil Assembly.EntryPoint.
I have another question: is there any way to get ParameterDefinition or even parameter Name from
ParameterSignature, because CilInstruction Operand is Only gives ParameterSignature

@dashne dashne changed the title Method EntryPoint Assembly EntryPoint Jan 31, 2020
@Washi1337
Copy link
Owner

Washi1337 commented Jan 31, 2020

MetadataImage has a ManagedEntrypoint property.

The only way to get the actual name of the parameter is to first obtain its index using MethodSignature.Parameters.IndexOf, and then use this index to get the right parameter definition from MethodDefinition.Parameters

Note that the way parameters are handled and resolved and made much easier in v4.

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

No branches or pull requests

2 participants