C# Class MongoDB.Driver.Linq.ExpressionPrettyPrinter

A class that pretty prints an Expression.
Inheritance: ExpressionVisitor
Show file Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
ExpressionPrettyPrinter ( ) : System

Initializes a new instance of the ExpressionPrettyPrinter class.

PrettyPrint ( Expression node ) : string

Pretty prints an Expression.

ToString ( ) : string

Returns the pretty printed string representation of the Expression.

Protected Methods

Method Description
VisitBinary ( BinaryExpression node ) : Expression

Visits a BinaryExpression.

VisitConditional ( ConditionalExpression node ) : Expression

Visits a ConditionalExpression.

VisitConstant ( ConstantExpression node ) : Expression

Visits a ConstantExpression.

VisitElementInit ( ElementInit node ) : ElementInit

Visits an ElementInit node.

VisitElementInitList ( ReadOnlyCollection nodes ) : IEnumerable

Visits an ElementInit list.

VisitInvocation ( InvocationExpression node ) : Expression

Visits an InvocationExpression.

VisitLambda ( LambdaExpression node ) : Expression

Visits a LambdaExpression.

VisitListInit ( ListInitExpression node ) : Expression

Visits a ListInitExpression.

VisitMember ( MemberExpression node ) : Expression

Visits a MemberExpression.

VisitMemberAssignment ( MemberAssignment node ) : MemberAssignment

Visits a MemberAssignment.

VisitMemberBinding ( MemberBinding node ) : MemberBinding

Visits a MemberBinding.

VisitMemberBindingList ( ReadOnlyCollection nodes ) : IEnumerable

Visits a MemberBinding list.

VisitMemberInit ( MemberInitExpression node ) : Expression

Visits a MemberInitExpression.

VisitMemberListBinding ( MemberListBinding node ) : MemberListBinding

Visits a MemberListBinding.

VisitMemberMemberBinding ( MemberMemberBinding node ) : MemberMemberBinding

Visits a MemberMemberBinding.

VisitMethodCall ( MethodCallExpression node ) : Expression

Visits a MethodCallExpression.

VisitNew ( NewExpression node ) : NewExpression

Visits a NewExpression.

VisitNewArray ( NewArrayExpression node ) : Expression

Visits a NewArrayExpression.

VisitParameter ( System.Linq.Expressions.ParameterExpression node ) : Expression

Visits a ParameterExpression.

VisitTypeBinary ( TypeBinaryExpression node ) : Expression

Visits a TypeBinaryExpression.

VisitUnary ( UnaryExpression node ) : Expression

Visits a UnaryExpression.

Private Methods

Method Description
FriendlyClassName ( Type type ) : string
PublicClassName ( Type type ) : string
VisitIndented ( Expression node ) : void
WriteHeader ( Expression node ) : void
WriteLine ( string line ) : void

Method Details

ExpressionPrettyPrinter() public method

Initializes a new instance of the ExpressionPrettyPrinter class.
public ExpressionPrettyPrinter ( ) : System
return System

PrettyPrint() public static method

Pretty prints an Expression.
public static PrettyPrint ( Expression node ) : string
node System.Linq.Expressions.Expression The Expression to pretty print.
return string

ToString() public method

Returns the pretty printed string representation of the Expression.
public ToString ( ) : string
return string

VisitBinary() protected method

Visits a BinaryExpression.
protected VisitBinary ( BinaryExpression node ) : Expression
node System.Linq.Expressions.BinaryExpression The BinaryExpression.
return System.Linq.Expressions.Expression

VisitConditional() protected method

Visits a ConditionalExpression.
protected VisitConditional ( ConditionalExpression node ) : Expression
node System.Linq.Expressions.ConditionalExpression The ConditionalExpression.
return System.Linq.Expressions.Expression

VisitConstant() protected method

Visits a ConstantExpression.
protected VisitConstant ( ConstantExpression node ) : Expression
node System.Linq.Expressions.ConstantExpression The ConstantExpression.
return System.Linq.Expressions.Expression

VisitElementInit() protected method

Visits an ElementInit node.
protected VisitElementInit ( ElementInit node ) : ElementInit
node System.Linq.Expressions.ElementInit The ElementInit node.
return System.Linq.Expressions.ElementInit

VisitElementInitList() protected method

Visits an ElementInit list.
protected VisitElementInitList ( ReadOnlyCollection nodes ) : IEnumerable
nodes ReadOnlyCollection The ElementInit list.
return IEnumerable

VisitInvocation() protected method

Visits an InvocationExpression.
protected VisitInvocation ( InvocationExpression node ) : Expression
node System.Linq.Expressions.InvocationExpression The InvocationExpression.
return System.Linq.Expressions.Expression

VisitLambda() protected method

Visits a LambdaExpression.
protected VisitLambda ( LambdaExpression node ) : Expression
node System.Linq.Expressions.LambdaExpression The LambdaExpression.
return System.Linq.Expressions.Expression

VisitListInit() protected method

Visits a ListInitExpression.
protected VisitListInit ( ListInitExpression node ) : Expression
node System.Linq.Expressions.ListInitExpression The ListInitExpression.
return System.Linq.Expressions.Expression

VisitMember() protected method

Visits a MemberExpression.
protected VisitMember ( MemberExpression node ) : Expression
node System.Linq.Expressions.MemberExpression The MemberExpression.
return System.Linq.Expressions.Expression

VisitMemberAssignment() protected method

Visits a MemberAssignment.
protected VisitMemberAssignment ( MemberAssignment node ) : MemberAssignment
node System.Linq.Expressions.MemberAssignment The MemberAssignment.
return System.Linq.Expressions.MemberAssignment

VisitMemberBinding() protected method

Visits a MemberBinding.
protected VisitMemberBinding ( MemberBinding node ) : MemberBinding
node System.Linq.Expressions.MemberBinding The MemberBinding.
return System.Linq.Expressions.MemberBinding

VisitMemberBindingList() protected method

Visits a MemberBinding list.
protected VisitMemberBindingList ( ReadOnlyCollection nodes ) : IEnumerable
nodes ReadOnlyCollection The MemberBinding list.
return IEnumerable

VisitMemberInit() protected method

Visits a MemberInitExpression.
protected VisitMemberInit ( MemberInitExpression node ) : Expression
node System.Linq.Expressions.MemberInitExpression The MemberInitExpression.
return System.Linq.Expressions.Expression

VisitMemberListBinding() protected method

Visits a MemberListBinding.
protected VisitMemberListBinding ( MemberListBinding node ) : MemberListBinding
node System.Linq.Expressions.MemberListBinding The MemberListBinding.
return System.Linq.Expressions.MemberListBinding

VisitMemberMemberBinding() protected method

Visits a MemberMemberBinding.
protected VisitMemberMemberBinding ( MemberMemberBinding node ) : MemberMemberBinding
node System.Linq.Expressions.MemberMemberBinding The MemberMemberBinding.
return System.Linq.Expressions.MemberMemberBinding

VisitMethodCall() protected method

Visits a MethodCallExpression.
protected VisitMethodCall ( MethodCallExpression node ) : Expression
node System.Linq.Expressions.MethodCallExpression The MethodCallExpression.
return System.Linq.Expressions.Expression

VisitNew() protected method

Visits a NewExpression.
protected VisitNew ( NewExpression node ) : NewExpression
node System.Linq.Expressions.NewExpression The NewExpression.
return System.Linq.Expressions.NewExpression

VisitNewArray() protected method

Visits a NewArrayExpression.
protected VisitNewArray ( NewArrayExpression node ) : Expression
node System.Linq.Expressions.NewArrayExpression The NewArrayExpression.
return System.Linq.Expressions.Expression

VisitParameter() protected method

Visits a ParameterExpression.
protected VisitParameter ( System.Linq.Expressions.ParameterExpression node ) : Expression
node System.Linq.Expressions.ParameterExpression The ParameterExpression.
return System.Linq.Expressions.Expression

VisitTypeBinary() protected method

Visits a TypeBinaryExpression.
protected VisitTypeBinary ( TypeBinaryExpression node ) : Expression
node System.Linq.Expressions.TypeBinaryExpression The TypeBinaryExpression.
return System.Linq.Expressions.Expression

VisitUnary() protected method

Visits a UnaryExpression.
protected VisitUnary ( UnaryExpression node ) : Expression
node System.Linq.Expressions.UnaryExpression The UnaryExpression.
return System.Linq.Expressions.Expression