Show / Hide Table of Contents

Class ExpressionRewriterFallbackCollection<TTarget>

Represents a collection of fallback rules.

Inheritance
System.Object
ExpressionRewriterFallbackCollection<TTarget>
Implements
System.Collections.Generic.IEnumerable<Fallback<ExpressionTreeBase, TTarget>>
System.Collections.IEnumerable
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class ExpressionRewriterFallbackCollection<TTarget> : Object, IEnumerable<Fallback<ExpressionTreeBase, TTarget>>, IEnumerable where TTarget : ITree
Type Parameters
Name Description
TTarget

Type of the target tree nodes.

Methods

Add(Expression<Func<Expression, TTarget>>, Int32)

Adds a new fallback rule.

Declaration
public void Add(Expression<Func<Expression, TTarget>> convert, int cost)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<System.Linq.Expressions.Expression, TTarget>> convert

Lambda expression representing the conversion from the source tree leaf node to the target tree node.

System.Int32 cost

Cost to apply the rule.

Add(Expression<Func<Expression, TTarget>>, Expression<Func<Expression, Boolean>>, Int32)

Adds a new fallback rule.

Declaration
public void Add(Expression<Func<Expression, TTarget>> convert, Expression<Func<Expression, bool>> predicate, int cost)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<System.Linq.Expressions.Expression, TTarget>> convert

Lambda expression representing the conversion from the source tree leaf node to the target tree node.

System.Linq.Expressions.Expression<System.Func<System.Linq.Expressions.Expression, System.Boolean>> predicate

Lambda expression representing the predicate to apply to evaluate applicability of the rule to a source tree leaf node.

System.Int32 cost

Cost to apply the rule.

GetEnumerator()

Gets an enumerator to iterate over the fallback rules in the collection.

Declaration
public IEnumerator<Fallback<ExpressionTreeBase, TTarget>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<Fallback<ExpressionTreeBase, TTarget>>

Enumerator to iterate over the fallback rules in the collection.

Implements

System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
In This Article
Back to top Generated by DocFX