Class CustomClassParser
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
ParentTypeTypeTypeTypeParamNamestringNullColHandlerINullColHandlerMethodBaseMemberInfoParametersList<DbItemPlan>MembersList<(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
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
colsColumnInfo[]The columns the result carries.
generatorGeneratorThe instruction writer to use.
nullSetPointNullSetPointWhere to jump when a value is
NULLand 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
previousIndexint
Returns
NeedNullSetPoint(ColumnInfo[])
Returns whether this plan can collapse its owning object when it reads a NULL.
public override bool NeedNullSetPoint(ColumnInfo[] cols)
Parameters
colsColumnInfo[]