C# Class Cilador.Clone.MultiplexedConstructor

Multiplexes a single constructor into component variables and instructions. This separates the compiler generated initialization variables and instructions used for, as an example, initializing fields from those that run the actual constructor logic.
Datei anzeigen Open project: rileywhite/Cilador Class Usage Examples

Private Properties

Property Type Description
Multiplex void
MultiplexedConstructor System
PopulateConstructionItems void
PopulateInitializationItemsAndFindBoundary void
TryGetIndexedVariableOperand bool
TryGetReferencedVariable bool
TryGetVariableDefinitionOperand bool

Public Methods

Method Description
Get ( ICloningContext cloningContext, Mono.Cecil.MethodDefinition constructor ) : MultiplexedConstructor

Gets a multiplexed constructor.

TryGetConstructionVariableIndex ( Instruction sourceInstruction, int &index ) : bool

Tries to get the index of a variable within the group of construction variables that have been pulled from the full collection of constructor variables.

TryGetConstructionVariableIndex ( Mono.Cecil.Cil.VariableDefinition sourceVariable, int &index ) : bool

Tries to get the index of a variable within the group of construction variables that have been pulled from the full collection of constructor variables.

TryGetInitializationVariableIndex ( Instruction sourceInstruction, int &index ) : bool

Tries to get the index of a variable within the group of initialization variables that have been pulled from the full collection of constructor variables.

TryGetInitializationVariableIndex ( VariableDefinition sourceVariable, int &index ) : bool

Tries to get the index of a variable within the group of initialization variables that have been pulled from the full collection of constructor variables.

Private Methods

Method Description
Multiplex ( ) : void

Does the work of multiplexing the constructor.

MultiplexedConstructor ( ICloningContext cloningContext, Mono.Cecil.MethodDefinition constructor ) : System

Creates a new MultiplexedConstructor.

PopulateConstructionItems ( ) : void

Populates construction variables and instructions.

PopulateInitializationItemsAndFindBoundary ( ) : void

Populated the initialization variables and instructions. Also populates the boundary instruction index.

TryGetIndexedVariableOperand ( Instruction instruction, IEnumerable indexedVariables, Mono.Cecil.Cil.VariableDefinition &variable ) : bool

If the instruction has a variable operand, retrieves it.

TryGetReferencedVariable ( Instruction instruction, VariableDefinition &variable ) : bool

Finds a variable, if any, that is referenced by an instruction.

TryGetVariableDefinitionOperand ( Instruction instruction, VariableDefinition &variable ) : bool

If the instruction has a variable operand, retrieves it.

Method Details

Get() public static method

Gets a multiplexed constructor.
public static Get ( ICloningContext cloningContext, Mono.Cecil.MethodDefinition constructor ) : MultiplexedConstructor
cloningContext ICloningContext cloning context.
constructor Mono.Cecil.MethodDefinition Constructor to multiplex.
return MultiplexedConstructor

TryGetConstructionVariableIndex() public method

Tries to get the index of a variable within the group of construction variables that have been pulled from the full collection of constructor variables.
public TryGetConstructionVariableIndex ( Instruction sourceInstruction, int &index ) : bool
sourceInstruction Mono.Cecil.Cil.Instruction Source instruction possibly referencing a variable to look up.
index int Index of the variable in the subset of variables.
return bool

TryGetConstructionVariableIndex() public method

Tries to get the index of a variable within the group of construction variables that have been pulled from the full collection of constructor variables.
public TryGetConstructionVariableIndex ( Mono.Cecil.Cil.VariableDefinition sourceVariable, int &index ) : bool
sourceVariable Mono.Cecil.Cil.VariableDefinition Source variable to look up.
index int Index of the variable in the subset of variables.
return bool

TryGetInitializationVariableIndex() public method

Tries to get the index of a variable within the group of initialization variables that have been pulled from the full collection of constructor variables.
public TryGetInitializationVariableIndex ( Instruction sourceInstruction, int &index ) : bool
sourceInstruction Mono.Cecil.Cil.Instruction Source instruction possibly referencing a variable to look up.
index int Index of the variable in the subset of variables.
return bool

TryGetInitializationVariableIndex() public method

Tries to get the index of a variable within the group of initialization variables that have been pulled from the full collection of constructor variables.
public TryGetInitializationVariableIndex ( VariableDefinition sourceVariable, int &index ) : bool
sourceVariable VariableDefinition Source variable to look up.
index int Index of the variable in the subset of variables.
return bool