C# Class SubSonic.Extensions.ExpressionExtensions

This class contains general extension methods for the System.Linq.Expressions.Expression class.
Mostra file Open project: rally25rs/SubSonic-3.0

Public Methods

Method Description
PrintExpressionTree ( this expr ) : string

Evaluates an Expression and builts a for-display string representation of the expression tree. This is primarily used to debug and visualize an expression, to help understand how it will be parsed.

this is reflection heavy, try not to use it too terribly much. was too lazy to build out full dynamic methods for a basic utility/support/debug-helper function, since it shouldn't be called all that much.

Private Methods

Method Description
AddBlankTreeLines ( StringBuilder sb, int depth ) : void
AddTreeLines ( StringBuilder sb, int depth ) : void
VisitNode ( Expression expr, string desc, StringBuilder sb, int depth, int &nodeNumber ) : void

Method Details

PrintExpressionTree() public static method

Evaluates an Expression and builts a for-display string representation of the expression tree. This is primarily used to debug and visualize an expression, to help understand how it will be parsed.
this is reflection heavy, try not to use it too terribly much. was too lazy to build out full dynamic methods for a basic utility/support/debug-helper function, since it shouldn't be called all that much.
public static PrintExpressionTree ( this expr ) : string
expr this
return string