Click or drag to resize

ExpressionExtensionsGetExpressionPartsT Method

[This is preliminary documentation and is subject to change.]

Converts an expression into parts. Each of these parts can then be used to traverse the expression and get/set values for each part. The part marked with 'IsTarget' is the last part of the expression. The order of parts matches the order in the expression, from left to right

Namespace:  CSInfrastructure.Extensions
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.8.0.0 (1.8.0.0)
Syntax
C#
public static List<ExpressionExtensionsExpressionPartInfo> GetExpressionParts<T>(
	this Expression<T> expression
)

Parameters

expression
Type: System.Linq.ExpressionsExpressionT
The expression to parse

Type Parameters

T
The type used in the expression

Return Value

Type: ListExpressionExtensionsExpressionPartInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ExpressionT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples

The expression x => x.Property1.Property2.Property3 would yield 3 parts.

The first part would be to get/set the value of Property1 on 'x'

The second part would be to get/set the value of Property2 on 'Property1'

The third part would be to get/set the value of Property3 on 'Property2'

See Also