Edit

Share via


ExpressionVisitor.VisitAndConvert Method

Definition

Visits an expression, casting the result back to the original expression type.

Overloads

VisitAndConvert<T>(ReadOnlyCollection<T>, String)

Visits all expressions in the collection, casting the results back to the original expression type.

VisitAndConvert<T>(T, String)

Visits an expression, casting the result back to the original expression type.

VisitAndConvert<T>(ReadOnlyCollection<T>, String)

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

Visits all expressions in the collection, casting the results back to the original expression type.

public:
generic <typename T>
 where T : System::Linq::Expressions::Expression System::Collections::ObjectModel::ReadOnlyCollection<T> ^ VisitAndConvert(System::Collections::ObjectModel::ReadOnlyCollection<T> ^ nodes, System::String ^ callerName);
public System.Collections.ObjectModel.ReadOnlyCollection<T> VisitAndConvert<T> (System.Collections.ObjectModel.ReadOnlyCollection<T> nodes, string callerName) where T : System.Linq.Expressions.Expression;
public System.Collections.ObjectModel.ReadOnlyCollection<T> VisitAndConvert<T> (System.Collections.ObjectModel.ReadOnlyCollection<T> nodes, string? callerName) where T : System.Linq.Expressions.Expression;
member this.VisitAndConvert : System.Collections.ObjectModel.ReadOnlyCollection<'T (requires 'T :> System.Linq.Expressions.Expression)> * string -> System.Collections.ObjectModel.ReadOnlyCollection<'T (requires 'T :> System.Linq.Expressions.Expression)> (requires 'T :> System.Linq.Expressions.Expression)
Public Function VisitAndConvert(Of T As Expression) (nodes As ReadOnlyCollection(Of T), callerName As String) As ReadOnlyCollection(Of T)

Type Parameters

T

The type of the expressions.

Parameters

nodes
ReadOnlyCollection<T>

The expressions to visit.

callerName
String

The name of the calling method; used to report a better error message.

Returns

The modified expression collection, if any expression was modified; otherwise, returns the original expression collection.

Exceptions

The visit method for one of the expressions returned a different type.

Applies to

VisitAndConvert<T>(T, String)

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

Visits an expression, casting the result back to the original expression type.

public:
generic <typename T>
 where T : System::Linq::Expressions::Expression T VisitAndConvert(T node, System::String ^ callerName);
public T VisitAndConvert<T> (T node, string callerName) where T : System.Linq.Expressions.Expression;
public T? VisitAndConvert<T> (T? node, string? callerName) where T : System.Linq.Expressions.Expression;
member this.VisitAndConvert : 'T * string -> 'T (requires 'T :> System.Linq.Expressions.Expression)
Public Function VisitAndConvert(Of T As Expression) (node As T, callerName As String) As T

Type Parameters

T

The type of the expression.

Parameters

node
T

The expression to visit.

callerName
String

The name of the calling method; used to report to report a better error message.

Returns

T

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

Exceptions

The visit method for this node returned a different type.

Applies to