Class LabelExpressionSlim
Lighweight representation of a label, which can be put in any ExpressionSlim context. If it is jumped to, it will get the value provided by the corresponding GotoExpressionSlim. Otherwise, it receives the value in DefaultValue.
Inherited Members
Namespace: System.Linq.Expressions
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public sealed class LabelExpressionSlim : ExpressionSlim
Properties
DefaultValue
The value of the LabelExpressionSlim when the label is reached through normal control flow (e.g. is not jumped to).
Declaration
public ExpressionSlim DefaultValue { get; }
Property Value
Type | Description |
---|---|
ExpressionSlim |
NodeType
Gets the expression node type.
Declaration
public override ExpressionType NodeType { get; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.ExpressionType |
Overrides
Target
The LabelTargetSlim which this label is associated with.
Declaration
public LabelTargetSlim Target { get; }
Property Value
Type | Description |
---|---|
LabelTargetSlim |
Methods
Accept(ExpressionSlimVisitor)
Accepts the expression tree node in the specified visitor.
Declaration
protected override ExpressionSlim Accept(ExpressionSlimVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
ExpressionSlimVisitor | visitor | Visitor to process the current expression tree node. |
Returns
Type | Description |
---|---|
ExpressionSlim | Result of visiting the node. |
Overrides
Accept<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>(ExpressionSlimVisitor<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>)
Accepts the expression tree node in the specified visitor.
Declaration
protected override TExpression Accept<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>(ExpressionSlimVisitor<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget> visitor)
where TLambdaExpression : TExpression where TParameterExpression : TExpression where TNewExpression : TExpression where TMemberAssignment : TMemberBinding where TMemberListBinding : TMemberBinding where TMemberMemberBinding : TMemberBinding
Parameters
Type | Name | Description |
---|---|---|
ExpressionSlimVisitor<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget> | visitor | Visitor to process the current expression tree node. |
Returns
Type | Description |
---|---|
TExpression | Result of visiting the node. |
Type Parameters
Name | Description |
---|---|
TExpression | Target type for expressions. |
TLambdaExpression | Target type for lambda expressions. This type has to derive from TExpression. |
TParameterExpression | Target type for parameter expressions. This type has to derive from TExpression. |
TNewExpression | Target type for new expressions. This type has to derive from TExpression. |
TElementInit | Target type for element initializers. |
TMemberBinding | Target type for member bindings. |
TMemberAssignment | Target type for member assignments. This type has to derive from TMemberBinding. |
TMemberListBinding | Target type for member list bindings. This type has to derive from TMemberBinding. |
TMemberMemberBinding | Target type for member member bindings. This type has to derive from TMemberBinding. |
TCatchBlock | Target type for catch blocks. |
TSwitchCase | Target type for switch cases. |
TLabelTarget | Target type for label targets. |
Overrides
Update(LabelTargetSlim, ExpressionSlim)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
Declaration
public LabelExpressionSlim Update(LabelTargetSlim target, ExpressionSlim defaultValue)
Parameters
Type | Name | Description |
---|---|---|
LabelTargetSlim | target | The Target property of the result. |
ExpressionSlim | defaultValue | The DefaultValue property of the result. |
Returns
Type | Description |
---|---|
LabelExpressionSlim | This expression if no children changed, or an expression with the updated children. |