C# Class Pchp.Core.Dynamic.ConvertExpression

Helper methods for converting expressions.
Afficher le fichier Open project: iolevel/peachpie Class Usage Examples

Méthodes publiques

Méthode Description
Bind ( Expression arg, Type target, Expression ctx = null ) : Expression

Creates expression that converts arg to target type.

BindCost ( Expression arg, Type target ) : Expression

Creates expression that calculates cost of conversion from arg to type target. In some cases, returned expression is a constant and can be used in compile time.

BindDefault ( Type t ) : Expression

Private Methods

Méthode Description
BindAsCallable ( Expression expr ) : Expression
BindCostFromDouble ( Expression arg, Type target ) : ConversionCost
BindCostFromLong ( Expression arg, Type target ) : ConversionCost
BindCostFromNumber ( Expression arg, Type target ) : Expression
BindCostFromPhpString ( Expression arg, Type target ) : ConversionCost
BindCostFromString ( Expression arg, Type target ) : ConversionCost
BindCostFromValue ( Expression arg, Type target ) : Expression
BindToArray ( Expression expr ) : Expression
BindToBool ( Expression expr ) : Expression
BindToClass ( Expression expr ) : Expression
BindToDouble ( Expression expr ) : Expression
BindToLong ( Expression expr ) : Expression
BindToNumber ( Expression expr ) : Expression
BindToPhpString ( Expression expr, Expression ctx ) : Expression
BindToString ( Expression expr, Expression ctx ) : Expression
BindToValue ( Expression expr ) : Expression
BindToVoid ( Expression expr ) : Expression
VoidAsConstant ( Expression expr, object value, Type type ) : Expression

Method Details

Bind() public static méthode

Creates expression that converts arg to target type.
public static Bind ( Expression arg, Type target, Expression ctx = null ) : Expression
arg System.Linq.Expressions.Expression Source expression to be converted.
target System.Type Target type.
ctx System.Linq.Expressions.Expression Expression with current context.
Résultat System.Linq.Expressions.Expression

BindCost() public static méthode

Creates expression that calculates cost of conversion from arg to type target. In some cases, returned expression is a constant and can be used in compile time.
public static BindCost ( Expression arg, Type target ) : Expression
arg System.Linq.Expressions.Expression Expression to be converted.
target System.Type Target type.
Résultat System.Linq.Expressions.Expression

BindDefault() public static méthode

public static BindDefault ( Type t ) : Expression
t System.Type
Résultat System.Linq.Expressions.Expression