Class ParsedExpressionTypeConverter
- Namespace
- LfrlAnvil.Computable.Expressions.Constructs
- Assembly
- LfrlAnvil.Computable.Expressions.dll
Represents a type converter construct.
public class ParsedExpressionTypeConverter
- Inheritance
-
ParsedExpressionTypeConverter
- Derived
- Inherited Members
Constructors
ParsedExpressionTypeConverter(Type, Type?)
Creates a new ParsedExpressionTypeConverter instance.
public ParsedExpressionTypeConverter(Type targetType, Type? sourceType = null)
Parameters
Properties
SourceType
Optional source type.
public Type? SourceType { get; }
Property Value
TargetType
Target type.
public Type TargetType { get; }
Property Value
Methods
CreateConversionExpression(Expression)
Creates an expression.
[Pure]
protected virtual Expression CreateConversionExpression(Expression operand)
Parameters
operand
ExpressionArgument.
Returns
- Expression
New Expression.
TryCreateFromConstant(ConstantExpression)
Attempts to create an expression from a constant.
[Pure]
protected virtual Expression? TryCreateFromConstant(ConstantExpression operand)
Parameters
operand
ConstantExpressionConstant argument.
Returns
- Expression
New Expression or null when it could not be created.