Show / Hide Table of Contents

Class BottomUpExpressionRewriter<TTarget>

Defines a bottom-up rewriter for LINQ expression trees to TTarget trees.

Inheritance
System.Object
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>
BottomUpExpressionRewriter<TTarget>
Inherited Members
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.Rewrite(ExpressionTreeBase)
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.WriteLog(String)
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.OnLeafAdded(Leaf<ExpressionTreeBase, TTarget>)
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.OnRuleAdded(Rule<ExpressionTreeBase, TTarget>)
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.OnFallbackAdded(Fallback<ExpressionTreeBase, TTarget>)
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.Log
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.Leaves
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.Rules
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.Fallbacks
BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory>.DebugView
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class BottomUpExpressionRewriter<TTarget> : BottomUpRewriter<ExpressionTreeBase, ExpressionTreeNode, TTarget, ExpressionTreeWildcardFactory> where TTarget : ITree
Type Parameters
Name Description
TTarget

Type of the target trees. Needs to implement ITree.

Constructors

BottomUpExpressionRewriter()

Creates a new bottom up rewriter instance with no initial rewrite rule definitions. Collection initializer syntax can be used for the Leaves, Rules, and Fallbacks properties.

Declaration
public BottomUpExpressionRewriter()

Properties

Fallbacks

Gets the collection of fallback rules used by the rewriter.

Declaration
public ExpressionRewriterFallbackCollection<TTarget> Fallbacks { get; }
Property Value
Type Description
ExpressionRewriterFallbackCollection<TTarget>

Leaves

Gets the collection of leaves recognized by the rewriter.

Declaration
public ExpressionRewriterLeafCollection<TTarget> Leaves { get; }
Property Value
Type Description
ExpressionRewriterLeafCollection<TTarget>

Rules

Gets the collection of rewrite pattern rules recognized by the rewriter.

Declaration
public ExpressionRewriterRuleCollection<TTarget> Rules { get; }
Property Value
Type Description
ExpressionRewriterRuleCollection<TTarget>

Methods

Rewrite(Expression)

Rewrites the given expression tree to a target tree using the rules in the table.

Declaration
public TTarget Rewrite(Expression expression)
Parameters
Type Name Description
System.Linq.Expressions.Expression expression

Expression tree to rewrite.

Returns
Type Description
TTarget

Target tree after applying the rewrite rules in the table.

In This Article
Back to top Generated by DocFX