ExpressionPrinter Class

Definition

A class to create a printable string representation of expression.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class ExpressionPrinter : System.Linq.Expressions.ExpressionVisitor
type ExpressionPrinter = class
    inherit ExpressionVisitor
Public Class ExpressionPrinter
Inherits ExpressionVisitor
Inheritance
ExpressionPrinter

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Constructors

ExpressionPrinter()

Creates a new instance of the ExpressionPrinter class.

Methods

Append(Object)
Append(String)

Appends the given string to current output being built.

AppendLine()

Appends a new line to current output being built.

AppendLine(Object)
AppendLine(String)

Appends the given string and a new line to current output being built.

AppendLines(Object, Boolean)
AppendLines(String, Boolean)

Appends all the lines to current output being built.

GenerateBinaryOperator(ExpressionType)

Returns binary operator string corresponding to given ExpressionType.

Indent()

Creates a scoped indenter that will increment the indent, then decrement it when disposed.

PostProcess(String)
Print(Expression)

Creates a printable string representation of the given expression.

Print(Expression, Nullable<Int32>)

Creates a printable string representation of the given expression.

PrintCore(Expression, Nullable<Int32>, Boolean)
PrintDebug(Expression)

Creates a printable verbose string representation of the given expression.

PrintDebug(Expression, Nullable<Int32>, Boolean)
PrintExpression(Expression, Nullable<Int32>)

Creates a printable string representation of the given expression.

PrintExpressionDebug(Expression)

Creates a printable verbose string representation of the given expression.

ToString() System.Linq.Expressions.ExpressionVisitor.ToString
Visit(Expression)

Dispatches the expression to one of the more specialized visit methods in this class.

VisitBinary(BinaryExpression)

Visits the children of the BinaryExpression.

VisitBlock(BlockExpression)

Visits the children of the BlockExpression.

VisitCollection<T>(IReadOnlyCollection<T>, Action<ExpressionPrinter>)

Visit given readonly collection of expression for printing.

VisitConditional(ConditionalExpression)

Visits the children of the ConditionalExpression.

VisitConstant(ConstantExpression)

Visits the ConstantExpression.

VisitDefault(DefaultExpression)

Visits the DefaultExpression.

VisitExtension(Expression)

Visits the children of the extension expression.

VisitGoto(GotoExpression)

Visits the children of the GotoExpression.

VisitIndex(IndexExpression)

Visits the children of the IndexExpression.

VisitInvocation(InvocationExpression)

Visits the children of the InvocationExpression.

VisitLabel(LabelExpression)

Visits the children of the LabelExpression.

VisitLambda<T>(Expression<T>)

Visits the children of the Expression<TDelegate>.

VisitList<T>(IReadOnlyList<T>, Action<ExpressionPrinter>)
VisitLoop(LoopExpression)

Visits the children of the LoopExpression.

VisitMember(MemberExpression)

Visits the children of the MemberExpression.

VisitMemberInit(MemberInitExpression)

Visits the children of the MemberInitExpression.

VisitMethodCall(MethodCallExpression)

Visits the children of the MethodCallExpression.

VisitNew(NewExpression)

Visits the children of the NewExpression.

VisitNewArray(NewArrayExpression)

Visits the children of the NewArrayExpression.

VisitParameter(ParameterExpression)

Visits the ParameterExpression.

VisitSwitch(SwitchExpression)

Visits the children of the SwitchExpression.

VisitTry(TryExpression)

Visits the children of the TryExpression.

VisitTypeBinary(TypeBinaryExpression)

Visits the children of the TypeBinaryExpression.

VisitUnary(UnaryExpression)

Visits the children of the UnaryExpression.

Applies to