Class DefaultTypeParsingInfo
Provides the standard mapping settings for a class, record, or struct.
public class DefaultTypeParsingInfo : TypeParsingInfo, ICanAddPossibleConstructor, ICanProvideParamInfos, ICanAddMember, ICanProvideConstructions, ICanProvideMembers, ICanUpdateGroupKey
- Inheritance
-
DefaultTypeParsingInfo
- Implements
- Inherited Members
- Extension Methods
Constructors
DefaultTypeParsingInfo(Type)
Provides the standard mapping settings for a class, record, or struct.
public DefaultTypeParsingInfo(Type Type)
Parameters
TypeType
Fields
Type
The type used
public readonly Type Type
Field Value
Properties
AvailableMembers
A collection of public properties and fields that can be set after instantiation.
public ReadOnlySpan<MemberParser> AvailableMembers { get; set; }
Property Value
Flags
Optional discovery and registration behavior for this mapping. Type attributes supply the initial value. Change the flags before the type is first parsed.
public DefaultTypeParsingFlags Flags { get; set; }
Property Value
GroupKey
The type-level grouping option, or null when none is configured.
public IGroupingRule? GroupKey { get; set; }
Property Value
PossibleConstructors
The collection of prioritized construction paths (constructors or static factory methods) discovered or manually registered for this type.
public ReadOnlySpan<MethodCtorInfo> PossibleConstructors { get; set; }
Property Value
Methods
AddMember(MemberParser)
Manually add a member to fill after construction, prioritized as it is provided.
public void AddMember(MemberParser member)
Parameters
memberMemberParser
AddPossibleConstruction(MethodCtorInfo)
Adds a configured construction path to the available paths.
public void AddPossibleConstruction(MethodCtorInfo mci)
Parameters
mciMethodCtorInfo
GetParamInfos()
Enumerates every slot of the type, constructor parameters and members alike.
public IEnumerable<ParamInfo> GetParamInfos()
Returns
Init()
Scans the type via reflection to find constructors, static methods, properties, and fields for automatic mapping.
public void Init()
TryGetParser(Type, RecursiveInfo, ParamInfo, ColumnInfo[], ColModifier, ref ColumnUsage, AdditionalFlags)
Tries to create a read plan for the requested type and result columns.
public override DbItemPlan? TryGetParser(Type currentClosedType, RecursiveInfo previousUsages, ParamInfo paramInfo, ColumnInfo[] columns, ColModifier colModifier, ref ColumnUsage colUsage, MethodCtorInfo.AdditionalFlags callerFlags = (MethodCtorInfo.AdditionalFlags)0)
Parameters
currentClosedTypeTypeThe closed type being parsed.
previousUsagesRecursiveInfoThe parent types already used by this path.
paramInfoParamInfoThe slot rules for the value being parsed.
columnsColumnInfo[]The result columns available to the parser.
colModifierColModifierThe current column matching settings.
colUsageColumnUsageThe columns already consumed by the current path.
callerFlagsMethodCtorInfo.AdditionalFlagsFlags from the construction path that requested this child.
Returns
ValidateCanUseType(Type)
Throws when this mapping cannot be registered for TargetType.
public override void ValidateCanUseType(Type TargetType)
Parameters
TargetTypeType