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
TObjectRoot object type.
TResultType 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
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
propertyExpression<Func<TObject, ICollection<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IEnumerable<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IList<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, IReadOnlyList<TProperty>>>Property to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty 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
propertyExpression<Func<TObject, TProperty>>Property to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty type (or element type of a collection).