Method | Description | |
---|---|---|
GetField ( this self ) : |
Get the FieldDefinition associated with the Instruction.
|
|
GetMethod ( this self ) : |
Get the MethodReference or MethodDefinition (but not a CallSite) associated with the Instruction Older (pre 0.9) Cecil CallSite did not inherit from MethodReference so this was not an issue |
|
GetOperand ( this self, Mono.Cecil.MethodDefinition method ) : object |
Return the operand of the Instruction. For macro instruction the operand is constructed.
|
|
GetOperandType ( this self, Mono.Cecil.MethodDefinition method ) : |
Return the type associated with the instruction's operand (INCOMPLETE).
|
|
GetParameter ( this self, Mono.Cecil.MethodDefinition method ) : Mono.Cecil.ParameterDefinition |
Get the ParameterDefinition associated with the Instruction.
|
|
GetPopCount ( this self, IMethodSignature method ) : int |
Get the number of values removed on the stack for this instruction.
|
|
GetPushCount ( this self ) : int |
Get the number of values placed on the stack by this instruction.
|
|
GetVariable ( this self, Mono.Cecil.MethodDefinition method ) : Mono.Cecil.Cil.VariableDefinition |
Get the VariableDefinition associated with the Instruction.
|
|
Is ( this self, Code code ) : bool |
Helper method to avoid patterns like "ins.Previous != null && ins.Previous.OpCode.Code == Code.Newobj" and replace it with a shorter "ins.Previous.Is (Code.Newobj)".
|
|
IsLoadArgument ( this self ) : bool |
Return if the Instruction is a load of an argument (ldarg* family).
|
|
IsLoadElement ( this self ) : bool |
Return if the Instruction is the load of an element (ldelem* family)
|
|
IsLoadIndirect ( this self ) : bool |
Return if the Instruction is a load indirect (ldind* family)
|
|
IsLoadLocal ( this self ) : bool |
Return if the Instruction is a load of a local variable (ldloc* family).
|
|
IsOperandZero ( this self ) : bool |
Determine if the instruction operand contains the constant zero (0).
|
|
IsStoreArgument ( this self ) : bool |
Return if the Instruction is a store of an argument (starg* family).
|
|
IsStoreLocal ( this self ) : bool |
Return if the Instruction is a store of a local variable (stloc* family).
|
|
TraceBack ( this self, IMethodSignature method ) : |
Return the instruction that match the current instruction. This is computed by substracting push and adding pop counts until the total becomes zero.
|
|
TraceBack ( this self, IMethodSignature method, int offset ) : |
Return the instruction that match the current instruction. This is computed by substracting push and adding pop counts until the total becomes zero.
|
public static GetField ( this self ) : |
||
self | this | The Instruction on which the extension method can be called. |
return |
public static GetMethod ( this self ) : |
||
self | this | The Instruction on which the extension method can be called. |
return |
public static GetOperand ( this self, Mono.Cecil.MethodDefinition method ) : object | ||
self | this | The Instruction on which the extension method can be called. |
method | Mono.Cecil.MethodDefinition | The method inside which the instruction comes from. |
return | object |
public static GetOperandType ( this self, Mono.Cecil.MethodDefinition method ) : |
||
self | this | The Instruction on which the extension method can be called. |
method | Mono.Cecil.MethodDefinition | The method inside which the instruction comes from. |
return |
public static GetParameter ( this self, Mono.Cecil.MethodDefinition method ) : Mono.Cecil.ParameterDefinition | ||
self | this | The Instruction on which the extension method can be called. |
method | Mono.Cecil.MethodDefinition | The method inside which the instruction comes from. /// Needed for the macro instruction where only the variable index is available. |
return | Mono.Cecil.ParameterDefinition |
public static GetPopCount ( this self, IMethodSignature method ) : int | ||
self | this | The Instruction on which the extension method can be called. |
method | IMethodSignature | The method inside which the instruction comes from /// (needed for StackBehaviour.Varpop). |
return | int |
public static GetPushCount ( this self ) : int | ||
self | this | The Instruction on which the extension method can be called. |
return | int |
public static GetVariable ( this self, Mono.Cecil.MethodDefinition method ) : Mono.Cecil.Cil.VariableDefinition | ||
self | this | The Instruction on which the extension method can be called. |
method | Mono.Cecil.MethodDefinition | The method inside which the instruction comes from. /// Needed for the macro instruction where only the variable index is available. |
return | Mono.Cecil.Cil.VariableDefinition |
public static Is ( this self, Code code ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
code | Code | The Code to compare to. |
return | bool |
public static IsLoadArgument ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsLoadElement ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsLoadIndirect ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsLoadLocal ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsOperandZero ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsStoreArgument ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static IsStoreLocal ( this self ) : bool | ||
self | this | The Instruction on which the extension method can be called. |
return | bool |
public static TraceBack ( this self, IMethodSignature method ) : |
||
self | this | The Instruction on which the extension method can be called. |
method | IMethodSignature | The method from which the instruction was extracted. |
return |
public static TraceBack ( this self, IMethodSignature method, int offset ) : |
||
self | this | The Instruction on which the extension method can be called. |
method | IMethodSignature | The method from which the instruction was extracted. |
offset | int | Offset to add the the Pop count. Useful to track several parameters to a method. |
return |