C# Класс Vertesaur.Generation.Expressions.LocalExpressionVariableManager

Manages local variables during the dynamic generation of expression blocks.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

Метод Описание
CodeContractInvariants ( ) : void
GetNewVariableName ( ) : string
GetNewVariableNumber ( ) : int
RemoveFirstPending ( Type type ) : System.Linq.Expressions.ParameterExpression

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

GetVariable() публичный Метод

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.
Результат System.Linq.Expressions.ParameterExpression

LocalExpressionVariableManager() публичный Метод

Manages the lifetimes and reuse of parameter expressions which are used as local variables.
public LocalExpressionVariableManager ( ) : System
Результат System

ReleaseVariable() публичный Метод

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.
Результат bool

ReleaseVariables() публичный Метод

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.
Результат bool

Use() публичный Метод

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.
Результат VariableUsage