Table of Contents

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

TObject

Root object type.

TResult

Type 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

resultFactory Func<string, TResult>

Creates the result from the path.

propertyPath IList<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

property LambdaExpression

Property to add.

Returns

NestedPropertyPathBuilder<TObject, TProperty, TResult>

Builder to add nested properties.

Type Parameters

TProperty

Property type (or element type of a collection).

Build()

Builds the result from the property path.

public TResult Build()

Returns

TResult

Result.