Table of Contents

Class PropertyPathBuilder<TObject, TResult>

Namespace
Magicalizer.PropertyPaths
Assembly
Magicalizer.dll

Builder of a property path from the root object.

public class PropertyPathBuilder<TObject, TResult> : PropertyPathBuilderBase<TObject, TResult> where TObject : class where TResult : class

Type Parameters

TObject

Root object type.

TResult

Type of the built result.

Inheritance
PropertyPathBuilderBase<TObject, TResult>
PropertyPathBuilder<TObject, TResult>
Derived
Inherited Members

Constructors

PropertyPathBuilder(Func<string, TResult>)

Creates a builder.

public PropertyPathBuilder(Func<string, TResult> resultFactory)

Parameters

resultFactory Func<string, TResult>

Creates the result from the path.

Methods

Add<TProperty>(Expression<Func<TObject, ICollection<TProperty>?>>)

Adds the property to the path.

public NestedPropertyPathBuilder<TObject, TProperty, TResult> Add<TProperty>(Expression<Func<TObject, ICollection<TProperty>?>> property) where TProperty : class

Parameters

property Expression<Func<TObject, ICollection<TProperty>>>

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

Add<TProperty>(Expression<Func<TObject, IEnumerable<TProperty>?>>)

Adds the property to the path.

public NestedPropertyPathBuilder<TObject, TProperty, TResult> Add<TProperty>(Expression<Func<TObject, IEnumerable<TProperty>?>> property) where TProperty : class

Parameters

property Expression<Func<TObject, IEnumerable<TProperty>>>

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

Add<TProperty>(Expression<Func<TObject, IList<TProperty>?>>)

Adds the property to the path.

public NestedPropertyPathBuilder<TObject, TProperty, TResult> Add<TProperty>(Expression<Func<TObject, IList<TProperty>?>> property) where TProperty : class

Parameters

property Expression<Func<TObject, IList<TProperty>>>

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

Add<TProperty>(Expression<Func<TObject, IReadOnlyList<TProperty>?>>)

Adds the property to the path.

public NestedPropertyPathBuilder<TObject, TProperty, TResult> Add<TProperty>(Expression<Func<TObject, IReadOnlyList<TProperty>?>> property) where TProperty : class

Parameters

property Expression<Func<TObject, IReadOnlyList<TProperty>>>

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

Add<TProperty>(Expression<Func<TObject, TProperty?>>)

Adds the property to the path.

public NestedPropertyPathBuilder<TObject, TProperty, TResult> Add<TProperty>(Expression<Func<TObject, TProperty?>> property) where TProperty : class

Parameters

property Expression<Func<TObject, TProperty>>

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).