Show / Hide Table of Contents

Class PartialExpressionVisitor<TExpression>

Base class for partial expression visitors that only support specific expression tree nodes.

Inheritance
System.Object
ExpressionVisitor<TExpression>
PartialExpressionVisitor<TExpression>
Inherited Members
ExpressionVisitor<TExpression>.Visit(Expression)
ExpressionVisitor<TExpression>.Visit<T>(ReadOnlyCollection<T>)
ExpressionVisitor<TExpression>.VisitAndConvert<TStronglyTypedResult>(Expression)
ExpressionVisitor<TExpression>.VisitAndConvert<T, TStronglyTypedResult>(ReadOnlyCollection<T>)
ExpressionVisitor<TExpression>.VisitIfNotNull<T, TResult>(T, Func<T, TResult>)
ExpressionVisitor<TExpression>.VisitLambda<T>(Expression<T>)
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class PartialExpressionVisitor<TExpression> : ExpressionVisitor<TExpression>
Type Parameters
Name Description
TExpression

Target type for expressions.

Constructors

PartialExpressionVisitor()

Declaration
public PartialExpressionVisitor()

Methods

NotSupported(Expression)

Gets the exception thrown when a non-supported node is encountered.

Declaration
protected virtual Exception NotSupported(Expression node)
Parameters
Type Name Description
System.Linq.Expressions.Expression node

Node not handled by the visitor.

Returns
Type Description
System.Exception

Exception that will be thrown in the visit method for the unhandled node.

VisitBinary(BinaryExpression)

Visits the children of the BinaryExpression.

Declaration
protected override TExpression VisitBinary(BinaryExpression node)
Parameters
Type Name Description
System.Linq.Expressions.BinaryExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitBinary(System.Linq.Expressions.BinaryExpression)

VisitBlock(BlockExpression)

Visits the children of the BlockExpression.

Declaration
protected override TExpression VisitBlock(BlockExpression node)
Parameters
Type Name Description
System.Linq.Expressions.BlockExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitBlock(System.Linq.Expressions.BlockExpression)

VisitConditional(ConditionalExpression)

Visits the children of the ConditionalExpression.

Declaration
protected override TExpression VisitConditional(ConditionalExpression node)
Parameters
Type Name Description
System.Linq.Expressions.ConditionalExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitConditional(System.Linq.Expressions.ConditionalExpression)

VisitConstant(ConstantExpression)

Visits the children of the ConstantExpression.

Declaration
protected override TExpression VisitConstant(ConstantExpression node)
Parameters
Type Name Description
System.Linq.Expressions.ConstantExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitConstant(System.Linq.Expressions.ConstantExpression)

VisitDebugInfo(DebugInfoExpression)

Visits the children of the DebugInfoExpression.

Declaration
protected override TExpression VisitDebugInfo(DebugInfoExpression node)
Parameters
Type Name Description
System.Linq.Expressions.DebugInfoExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitDebugInfo(System.Linq.Expressions.DebugInfoExpression)

VisitDefault(DefaultExpression)

Visits the children of the DefaultExpression.

Declaration
protected override TExpression VisitDefault(DefaultExpression node)
Parameters
Type Name Description
System.Linq.Expressions.DefaultExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitDefault(System.Linq.Expressions.DefaultExpression)

VisitDynamic(DynamicExpression)

Visits the children of the DynamicExpression.

Declaration
protected override TExpression VisitDynamic(DynamicExpression node)
Parameters
Type Name Description
System.Linq.Expressions.DynamicExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitDynamic(System.Linq.Expressions.DynamicExpression)

VisitExtension(Expression)

Visits the children of the extension expression node.

Declaration
protected override TExpression VisitExtension(Expression node)
Parameters
Type Name Description
System.Linq.Expressions.Expression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitExtension(System.Linq.Expressions.Expression)

VisitGoto(GotoExpression)

Visits the children of the GotoExpression.

Declaration
protected override TExpression VisitGoto(GotoExpression node)
Parameters
Type Name Description
System.Linq.Expressions.GotoExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitGoto(System.Linq.Expressions.GotoExpression)

VisitIndex(IndexExpression)

Visits the children of the IndexExpression.

Declaration
protected override TExpression VisitIndex(IndexExpression node)
Parameters
Type Name Description
System.Linq.Expressions.IndexExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitIndex(System.Linq.Expressions.IndexExpression)

VisitInvocation(InvocationExpression)

Visits the children of the InvocationExpression.

Declaration
protected override TExpression VisitInvocation(InvocationExpression node)
Parameters
Type Name Description
System.Linq.Expressions.InvocationExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitInvocation(System.Linq.Expressions.InvocationExpression)

VisitLabel(LabelExpression)

Visits the children of the LabelExpression.

Declaration
protected override TExpression VisitLabel(LabelExpression node)
Parameters
Type Name Description
System.Linq.Expressions.LabelExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitLabel(System.Linq.Expressions.LabelExpression)

VisitLambda<TDelegate>(Expression<TDelegate>)

Visits the children of the LambdaExpression.

Declaration
protected override TExpression VisitLambda<TDelegate>(Expression<TDelegate> node)
Parameters
Type Name Description
System.Linq.Expressions.Expression<TDelegate> node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Type Parameters
Name Description
TDelegate
Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitLambda<T>(System.Linq.Expressions.Expression<T>)

VisitListInit(ListInitExpression)

Visits the children of the ListInitExpression.

Declaration
protected override TExpression VisitListInit(ListInitExpression node)
Parameters
Type Name Description
System.Linq.Expressions.ListInitExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitListInit(System.Linq.Expressions.ListInitExpression)

VisitLoop(LoopExpression)

Visits the children of the LoopExpression.

Declaration
protected override TExpression VisitLoop(LoopExpression node)
Parameters
Type Name Description
System.Linq.Expressions.LoopExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitLoop(System.Linq.Expressions.LoopExpression)

VisitMember(MemberExpression)

Visits the children of the MemberExpression.

Declaration
protected override TExpression VisitMember(MemberExpression node)
Parameters
Type Name Description
System.Linq.Expressions.MemberExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitMember(System.Linq.Expressions.MemberExpression)

VisitMemberInit(MemberInitExpression)

Visits the children of the MemberInitExpression.

Declaration
protected override TExpression VisitMemberInit(MemberInitExpression node)
Parameters
Type Name Description
System.Linq.Expressions.MemberInitExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitMemberInit(System.Linq.Expressions.MemberInitExpression)

VisitMethodCall(MethodCallExpression)

Visits the children of the MethodCallExpression.

Declaration
protected override TExpression VisitMethodCall(MethodCallExpression node)
Parameters
Type Name Description
System.Linq.Expressions.MethodCallExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitMethodCall(System.Linq.Expressions.MethodCallExpression)

VisitNew(NewExpression)

Visits the children of the NewExpression.

Declaration
protected override TExpression VisitNew(NewExpression node)
Parameters
Type Name Description
System.Linq.Expressions.NewExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitNew(System.Linq.Expressions.NewExpression)

VisitNewArray(NewArrayExpression)

Visits the children of the NewArrayExpression.

Declaration
protected override TExpression VisitNewArray(NewArrayExpression node)
Parameters
Type Name Description
System.Linq.Expressions.NewArrayExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitNewArray(System.Linq.Expressions.NewArrayExpression)

VisitParameter(ParameterExpression)

Visits the children of the ParameterExpression.

Declaration
protected override TExpression VisitParameter(ParameterExpression node)
Parameters
Type Name Description
System.Linq.Expressions.ParameterExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitParameter(System.Linq.Expressions.ParameterExpression)

VisitRuntimeVariables(RuntimeVariablesExpression)

Visits the children of the RuntimeVariablesExpression.

Declaration
protected override TExpression VisitRuntimeVariables(RuntimeVariablesExpression node)
Parameters
Type Name Description
System.Linq.Expressions.RuntimeVariablesExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitRuntimeVariables(System.Linq.Expressions.RuntimeVariablesExpression)

VisitSwitch(SwitchExpression)

Visits the children of the SwitchExpression.

Declaration
protected override TExpression VisitSwitch(SwitchExpression node)
Parameters
Type Name Description
System.Linq.Expressions.SwitchExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitSwitch(System.Linq.Expressions.SwitchExpression)

VisitTry(TryExpression)

Visits the children of the TryExpression.

Declaration
protected override TExpression VisitTry(TryExpression node)
Parameters
Type Name Description
System.Linq.Expressions.TryExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitTry(System.Linq.Expressions.TryExpression)

VisitTypeBinary(TypeBinaryExpression)

Visits the children of the TypeBinaryExpression.

Declaration
protected override TExpression VisitTypeBinary(TypeBinaryExpression node)
Parameters
Type Name Description
System.Linq.Expressions.TypeBinaryExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression)

VisitUnary(UnaryExpression)

Visits the children of the UnaryExpression.

Declaration
protected override TExpression VisitUnary(UnaryExpression node)
Parameters
Type Name Description
System.Linq.Expressions.UnaryExpression node

Expression to visit.

Returns
Type Description
TExpression

Result of visiting the expression.

Overrides
System.Linq.CompilerServices.ExpressionVisitor<TExpression>.VisitUnary(System.Linq.Expressions.UnaryExpression)
In This Article
Back to top Generated by DocFX