Table of Contents

Class DefaultTypeParsingInfo

Namespace
Rinku.Mapping.Defaults
Assembly
Rinku.dll

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

Type Type

Fields

Type

The type used

public readonly Type Type

Field Value

Type

Properties

AvailableMembers

A collection of public properties and fields that can be set after instantiation.

public ReadOnlySpan<MemberParser> AvailableMembers { get; set; }

Property Value

ReadOnlySpan<MemberParser>

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

DefaultTypeParsingFlags

GroupKey

The type-level grouping option, or null when none is configured.

public IGroupingRule? GroupKey { get; set; }

Property Value

IGroupingRule

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

ReadOnlySpan<MethodCtorInfo>

Methods

AddMember(MemberParser)

Manually add a member to fill after construction, prioritized as it is provided.

public void AddMember(MemberParser member)

Parameters

member MemberParser

AddPossibleConstruction(MethodCtorInfo)

Adds a configured construction path to the available paths.

public void AddPossibleConstruction(MethodCtorInfo mci)

Parameters

mci MethodCtorInfo

GetParamInfos()

Enumerates every slot of the type, constructor parameters and members alike.

public IEnumerable<ParamInfo> GetParamInfos()

Returns

IEnumerable<ParamInfo>

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

currentClosedType Type

The closed type being parsed.

previousUsages RecursiveInfo

The parent types already used by this path.

paramInfo ParamInfo

The slot rules for the value being parsed.

columns ColumnInfo[]

The result columns available to the parser.

colModifier ColModifier

The current column matching settings.

colUsage ColumnUsage

The columns already consumed by the current path.

callerFlags MethodCtorInfo.AdditionalFlags

Flags from the construction path that requested this child.

Returns

DbItemPlan

ValidateCanUseType(Type)

Throws when this mapping cannot be registered for TargetType.

public override void ValidateCanUseType(Type TargetType)

Parameters

TargetType Type