ExpressionVisitor.Visit Method

Definition

Dispatches the expression or the list of expressions to one of the more specialized visit methods in this class.

Overloads

Visit(ReadOnlyCollection<Expression>)

Dispatches the list of expressions to one of the more specialized visit methods in this class.

Visit(Expression)

Dispatches the expression to one of the more specialized visit methods in this class.

Visit<T>(ReadOnlyCollection<T>, Func<T,T>)

Visits all nodes in the collection using a specified element visitor.

Visit(ReadOnlyCollection<Expression>)

Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs

Dispatches the list of expressions to one of the more specialized visit methods in this class.

C#
public System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.Expression> Visit(System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.Expression> nodes);

Parameters

nodes
ReadOnlyCollection<Expression>

The expressions to visit.

Returns

The modified expression list, if any one of the elements were modified; otherwise, returns the original expression list.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Visit(Expression)

Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs

Dispatches the expression to one of the more specialized visit methods in this class.

C#
public virtual System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression node);
C#
public virtual System.Linq.Expressions.Expression? Visit(System.Linq.Expressions.Expression? node);

Parameters

node
Expression

The expression to visit.

Returns

The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Visit<T>(ReadOnlyCollection<T>, Func<T,T>)

Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs
Source:
ExpressionVisitor.cs

Visits all nodes in the collection using a specified element visitor.

C#
public static System.Collections.ObjectModel.ReadOnlyCollection<T> Visit<T>(System.Collections.ObjectModel.ReadOnlyCollection<T> nodes, Func<T,T> elementVisitor);

Type Parameters

T

The type of the nodes.

Parameters

nodes
ReadOnlyCollection<T>

The nodes to visit.

elementVisitor
Func<T,T>

A delegate that visits a single element, optionally replacing it with a new element.

Returns

The modified node list, if any of the elements were modified; otherwise, returns the original node list.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0