C# Class Sigil.NonGeneric.Emit

Mostrar archivo Open project: kevin-montrose/Sigil Class Usage Examples

Public Methods

Method Description
LoadFunctionPointer ( MethodBuilder method, Type parameterTypes ) : Emit

Pushes a pointer to the given function onto the stack, as a native int. To resolve a method at runtime using an object, use LoadVirtualFunctionPointer instead. This method is provided as MethodBuilder cannot be inspected for parameter information at runtime. If the passed parameterTypes do not match the given method, the produced code will be invalid.

LoadFunctionPointer ( MethodInfo method ) : Emit

Pushes a pointer to the given function onto the stack, as a native int. To resolve a method at runtime using an object, use LoadVirtualFunctionPointer instead.

LoadVirtualFunctionPointer ( MethodBuilder method, Type parameterTypes ) : Emit

Pops an object reference off the stack, and pushes a pointer to the given method's implementation on that object. For static or non-virtual functions, use LoadFunctionPointer. This method is provided as MethodBuilder cannot be inspected for parameter information at runtime. If the passed parameterTypes do not match the given method, the produced code will be invalid.

LoadVirtualFunctionPointer ( MethodInfo method ) : Emit

Pops an object reference off the stack, and pushes a pointer to the given method's implementation on that object. For static or non-virtual functions, use LoadFunctionPointer

Method Details

LoadFunctionPointer() public method

Pushes a pointer to the given function onto the stack, as a native int. To resolve a method at runtime using an object, use LoadVirtualFunctionPointer instead. This method is provided as MethodBuilder cannot be inspected for parameter information at runtime. If the passed parameterTypes do not match the given method, the produced code will be invalid.
public LoadFunctionPointer ( MethodBuilder method, Type parameterTypes ) : Emit
method MethodBuilder
parameterTypes Type
return Emit

LoadFunctionPointer() public method

Pushes a pointer to the given function onto the stack, as a native int. To resolve a method at runtime using an object, use LoadVirtualFunctionPointer instead.
public LoadFunctionPointer ( MethodInfo method ) : Emit
method MethodInfo
return Emit

LoadVirtualFunctionPointer() public method

Pops an object reference off the stack, and pushes a pointer to the given method's implementation on that object. For static or non-virtual functions, use LoadFunctionPointer. This method is provided as MethodBuilder cannot be inspected for parameter information at runtime. If the passed parameterTypes do not match the given method, the produced code will be invalid.
public LoadVirtualFunctionPointer ( MethodBuilder method, Type parameterTypes ) : Emit
method MethodBuilder
parameterTypes Type
return Emit

LoadVirtualFunctionPointer() public method

Pops an object reference off the stack, and pushes a pointer to the given method's implementation on that object. For static or non-virtual functions, use LoadFunctionPointer
public LoadVirtualFunctionPointer ( MethodInfo method ) : Emit
method MethodInfo
return Emit