Class PropertyPathBuilderBase<TObject, TResult>
- Namespace
- Magicalizer.PropertyPaths
- Assembly
- Magicalizer.dll
Base of property path builders.
public abstract class PropertyPathBuilderBase<TObject, TResult> where TObject : class where TResult : class
Type Parameters
TObjectRoot object type.
TResultType of the built result.
- Inheritance
-
PropertyPathBuilderBase<TObject, TResult>
- Derived
-
NestedPropertyPathBuilder<TOriginalObject, TObject, TResult>
- Inherited Members
Constructors
PropertyPathBuilderBase(Func<string, TResult>, IList<Expression>?)
Creates a builder.
protected PropertyPathBuilderBase(Func<string, TResult> resultFactory, IList<Expression>? propertyPath = null)
Parameters
resultFactoryFunc<string, TResult>Creates the result from the path.
propertyPathIList<Expression>Path built so far.
Methods
AddToPath<TProperty>(LambdaExpression)
Adds the property to the path.
protected NestedPropertyPathBuilder<TObject, TProperty, TResult> AddToPath<TProperty>(LambdaExpression property) where TProperty : class
Parameters
propertyLambdaExpressionProperty to add.
Returns
- NestedPropertyPathBuilder<TObject, TProperty, TResult>
Builder to add nested properties.
Type Parameters
TPropertyProperty type (or element type of a collection).
Build()
Builds the result from the property path.
public TResult Build()
Returns
- TResult
Result.