[]
        
(Showing Draft Content)

C1.WPF.C1PropertyPathHelper.CreateSelector

CreateSelector Method

CreateSelector<T, X>(string)

Creates a Function to evaluate a given property path on a given object. For the property path: MyProperty1.MyProperty2 it will return the following function: i => i.MyProperty1.MyProperty2

Declaration
public static Func<T, X> CreateSelector<T, X>(string path)
Parameters
Type Name Description
string path

The path.

Returns
Type Description
Func<T, X>
Type Parameters
Name Description
T

Type of the element where the property path will be accessed.

X

Type of the result after evaluated the full property path.

CreateSelector<X>(Type, string)

Creates a function that when called execute the path expression over the specified object.

Declaration
public static Func<object, X> CreateSelector<X>(Type type, string path)
Parameters
Type Name Description
Type type

The type of the objects that will be passed to the resulting function.

string path

The path that will be evaluated.

Returns
Type Description
Func<object, X>
Type Parameters
Name Description
X
Remarks

The object type passed in the resulting function must be the same as the specified in this method, otherwise an exception will be thrown.