Table of Contents

Class NestedPropertyPathBuilder<TOriginalObject, TObject, TResult>

Namespace
Magicalizer.PropertyPaths
Assembly
Magicalizer.dll

Builder of the nested part of a property path.

public class NestedPropertyPathBuilder<TOriginalObject, TObject, TResult> : PropertyPathBuilderBase<TOriginalObject, TResult> where TOriginalObject : class where TObject : class where TResult : class

Type Parameters

TOriginalObject

Root object type.

TObject

Type of the object of the last added property.

TResult

Type of the built result.

Inheritance
PropertyPathBuilderBase<TOriginalObject, TResult>
NestedPropertyPathBuilder<TOriginalObject, TObject, TResult>
Inherited Members

Constructors

NestedPropertyPathBuilder(Func<string, TResult>, IList<Expression>)

Creates a builder.

public NestedPropertyPathBuilder(Func<string, TResult> resultFactory, IList<Expression> propertyPath)

Parameters

resultFactory Func<string, TResult>

Creates the result from the path.

propertyPath IList<Expression>

Path built so far.

Methods

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

Adds the nested property to the path.

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

Parameters

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

Property to add.

Returns

NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

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

Adds the nested property to the path.

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

Parameters

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

Property to add.

Returns

NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

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

Adds the nested property to the path.

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

Parameters

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

Property to add.

Returns

NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

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

Adds the nested property to the path.

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

Parameters

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

Property to add.

Returns

NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

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

Adds the nested property to the path.

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

Parameters

property Expression<Func<TObject, TProperty>>

Property to add.

Returns

NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).