C# Class Vertesaur.Generation.Expressions.LocalExpressionVariableManager

Manages local variables during the dynamic generation of expression blocks.
Datei anzeigen Open project: aarondandy/vertesaur Class Usage Examples

Public Methods

Method Description
GetVariable ( Type type ) : System.Linq.Expressions.ParameterExpression

Manually requests an unused variable from the pending pool or creates a new variable.

LocalExpressionVariableManager ( ) : System

Manages the lifetimes and reuse of parameter expressions which are used as local variables.

ReleaseVariable ( System.Linq.Expressions.ParameterExpression variable ) : bool

Manually releases a variable that is currently in use so it can be demoted to the pending variable pool.

ReleaseVariables ( IEnumerable variables ) : bool

Manually releases multiple variables that are currently in use to they can be demoted to the pending variable pool.

Use ( Type type ) : VariableUsage

Creates a new expression variable or reuses an unused expression variable.

Private Methods

Method Description
CodeContractInvariants ( ) : void
GetNewVariableName ( ) : string
GetNewVariableNumber ( ) : int
RemoveFirstPending ( Type type ) : System.Linq.Expressions.ParameterExpression

Method Details

GetVariable() public method

Manually requests an unused variable from the pending pool or creates a new variable.
public GetVariable ( Type type ) : System.Linq.Expressions.ParameterExpression
type System.Type The type of the variable to create.
return System.Linq.Expressions.ParameterExpression

LocalExpressionVariableManager() public method

Manages the lifetimes and reuse of parameter expressions which are used as local variables.
public LocalExpressionVariableManager ( ) : System
return System

ReleaseVariable() public method

Manually releases a variable that is currently in use so it can be demoted to the pending variable pool.
public ReleaseVariable ( System.Linq.Expressions.ParameterExpression variable ) : bool
variable System.Linq.Expressions.ParameterExpression The variable to manually release.
return bool

ReleaseVariables() public method

Manually releases multiple variables that are currently in use to they can be demoted to the pending variable pool.
public ReleaseVariables ( IEnumerable variables ) : bool
variables IEnumerable The variables to manually release.
return bool

Use() public method

Creates a new expression variable or reuses an unused expression variable.
public Use ( Type type ) : VariableUsage
type System.Type The type of the variable to create or reuse.
return VariableUsage