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
TOriginalObjectRoot object type.
TObjectType of the object of the last added property.
TResultType 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
resultFactoryFunc<string, TResult>Creates the result from the path.
propertyPathIList<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
propertyExpression<Func<TObject, ICollection<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IEnumerable<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IList<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IReadOnlyList<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, TProperty>>Property to add.
Returns
- NestedPropertyPathBuilder<TOriginalObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty type (or element type of a collection).