Hey there. I have a few questions about Mono.Cecil.

What does the MetadataType enum indicate exactly, and what do some of its 
values mean? Most of them are pretty obvious, but a few are difficult to 
understand:

   1. What is the difference between ByReference and TypedByReference?
   2. What is the difference between Var and MVar? What exactly are they 
   used for?
   3. What are OptionalModifier, RequiredModifier?
   4. When exactly is MetadataType.Object used?
   5. What is Sentinel?

Also, I'm having trouble understand how Resolve() works when used on 
references to generic methods.

I have a method like (C#): T GetComponent<T>()
I have a reference to it: !!0 GetComponent<Faction>()
the ElementMethod of this reference is: !!0 GetComponent()
But when I resolve any of the above the above, I get the definition: T 
GetComponent()

If I then have the following code:

var instMethod = new GenericInstanceMethod(resolvedMethodDefinition);
> instMethod.GenericArguments.Add(...) //fully parameterize it


instMethod is still: 

T GetComponent<Faction>()


This return type seems unresolved, and when I run the assembly, it doesn't 
function properly due to TypeLoadExceptions and InvalidProgramException 
about invalid IL.


-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to