Table of Contents

Class CustomClassParser

Namespace
Rinku.Mapping.Defaults
Assembly
Rinku.dll

Describes how to create an object and fill its members from a row. Use it when composing a custom object mapping from smaller plans.

public class CustomClassParser : SimpleDbItemParser, ISimpleDbItemPlan, ICompositeDbItemPlan
Inheritance
CustomClassParser
Implements
Inherited Members
Extension Methods

Constructors

CustomClassParser(Type, Type, string, INullColHandler, MemberInfo, List<DbItemPlan>, List<(MemberInfo, DbItemPlan)>?)

Describes how to create an object and fill its members from a row. Use it when composing a custom object mapping from smaller plans.

public CustomClassParser(Type ParentType, Type Type, string ParamName, INullColHandler NullColHandler, MemberInfo MethodBase, List<DbItemPlan> Parameters, List<(MemberInfo, DbItemPlan)>? Members = null)

Parameters

ParentType Type
Type Type
ParamName string
NullColHandler INullColHandler
MethodBase MemberInfo
Parameters List<DbItemPlan>
Members List<(MemberInfo, DbItemPlan)>

Properties

Children

Gets the child plans. Return an empty sequence for a plan with no children.

public override IEnumerable<DbItemPlan> Children { get; }

Property Value

IEnumerable<DbItemPlan>

Methods

Emit(ColumnInfo[], Generator, NullSetPoint)

Writes the instructions that read this value from the current row.

public override void Emit(ColumnInfo[] cols, Generator generator, NullSetPoint nullSetPoint)

Parameters

cols ColumnInfo[]

The columns the result carries.

generator Generator

The instruction writer to use.

nullSetPoint NullSetPoint

Where to jump when a value is NULL and the object must collapse.

IsSequencial(ref int)

Returns whether this plan reads columns in increasing order. Update previousIndex with the final column used.

public override bool IsSequencial(ref int previousIndex)

Parameters

previousIndex int

Returns

bool

NeedNullSetPoint(ColumnInfo[])

Returns whether this plan can collapse its owning object when it reads a NULL.

public override bool NeedNullSetPoint(ColumnInfo[] cols)

Parameters

cols ColumnInfo[]

Returns

bool