C# Класс Cilador.Clone.CloningExtensions

Extension methods used for cloning
Показать файл Открыть проект

Открытые методы

Метод Описание
ApplyLocalVariableTranslation ( this instruction, int translate, IEnumerable variables ) : Instruction

Examines the instruction and, if it accesses a local variable, provides a new version that translates the access by the given count.

If the instruction does not reference a local variable or if the translation is zero, then the original instruction will be returned. Likewise, if the instruction operand is a VariableDefinition and the translation doesn't cause the opcode to change (e.g. from stloc_S to stloc), then the original instruction is returned.

CloneAll ( object>.this cloners ) : void

Invokes clone on each item

IsLoadVariableAddressOpCode ( this code ) : bool

Determines whether in instruction opcode loads a variable address.

IsLoadVariableOpCode ( this code ) : bool

Determines whether in instruction opcode loads a variable.

IsStoreVariableOpCode ( this code ) : bool

Determines whether in instruction opcode stores a variable.

TryGetVariableIndex ( this instruction, int &variableIndex ) : bool

Tries to find the index of a variable referenced by an instruction, if any.

Приватные методы

Метод Описание
IsNestedWithin ( this type, Mono.Cecil.TypeDefinition possibleAncestorType ) : bool
SignatureEquals ( this target, MethodReference source, ICloningContext cloningContext ) : bool

Описание методов

ApplyLocalVariableTranslation() публичный статический Метод

Examines the instruction and, if it accesses a local variable, provides a new version that translates the access by the given count.
If the instruction does not reference a local variable or if the translation is zero, then the original instruction will be returned. Likewise, if the instruction operand is a VariableDefinition and the translation doesn't cause the opcode to change (e.g. from stloc_S to stloc), then the original instruction is returned.
public static ApplyLocalVariableTranslation ( this instruction, int translate, IEnumerable variables ) : Instruction
instruction this Instruction to look at.
translate int How to translate the referenced parameter, if any is referenced. Negative is a left translation, and positive is right.
variables IEnumerable Collection of variables that may be referenced.
Результат Mono.Cecil.Cil.Instruction

CloneAll() публичный статический Метод

Invokes clone on each item
public static CloneAll ( object>.this cloners ) : void
cloners object>.this
Результат void

IsLoadVariableAddressOpCode() публичный статический Метод

Determines whether in instruction opcode loads a variable address.
public static IsLoadVariableAddressOpCode ( this code ) : bool
code this OpCode's CIL code
Результат bool

IsLoadVariableOpCode() публичный статический Метод

Determines whether in instruction opcode loads a variable.
public static IsLoadVariableOpCode ( this code ) : bool
code this OpCode's CIL code
Результат bool

IsStoreVariableOpCode() публичный статический Метод

Determines whether in instruction opcode stores a variable.
public static IsStoreVariableOpCode ( this code ) : bool
code this OpCode's CIL code
Результат bool

TryGetVariableIndex() публичный статический Метод

Tries to find the index of a variable referenced by an instruction, if any.
public static TryGetVariableIndex ( this instruction, int &variableIndex ) : bool
instruction this Instruction to examine.
variableIndex int Index to populate, if found.
Результат bool