Share via


ReplacingExpressionVisitor.Replace Method

Definition

Overloads

Replace(IReadOnlyList<Expression>, IReadOnlyList<Expression>, Expression)

Replaces one expression with another in given expression tree.

Replace(Expression, Expression, Expression)

Replaces one expression with another in given expression tree.

Replace(IReadOnlyList<Expression>, IReadOnlyList<Expression>, Expression)

Source:
ReplacingExpressionVisitor.cs

Replaces one expression with another in given expression tree.

public static System.Linq.Expressions.Expression Replace (System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.Expression> originals, System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.Expression> replacements, System.Linq.Expressions.Expression tree);
static member Replace : System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.Expression> * System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.Expression> * System.Linq.Expressions.Expression -> System.Linq.Expressions.Expression
Public Shared Function Replace (originals As IReadOnlyList(Of Expression), replacements As IReadOnlyList(Of Expression), tree As Expression) As Expression

Parameters

originals
IReadOnlyList<Expression>

A list of original expressions to replace.

replacements
IReadOnlyList<Expression>

A list of expressions to be used as replacements.

tree
Expression

The expression tree in which replacement is going to be performed.

Returns

An expression tree with replacements made.

Applies to

Replace(Expression, Expression, Expression)

Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs
Source:
ReplacingExpressionVisitor.cs

Replaces one expression with another in given expression tree.

public static System.Linq.Expressions.Expression Replace (System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression replacement, System.Linq.Expressions.Expression tree);
static member Replace : System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.Expression
Public Shared Function Replace (original As Expression, replacement As Expression, tree As Expression) As Expression

Parameters

original
Expression

The expression to replace.

replacement
Expression

The expression to be used as replacement.

tree
Expression

The expression tree in which replacement is going to be performed.

Returns

An expression tree with replacements made.

Applies to