Table of Contents

Class MemberParser

Namespace
Rinku.Mapping
Assembly
Rinku.dll

A validated mapping between a class member (Property, Field, or Method) and a database column matcher.

public record MemberParser : IEquatable<MemberParser>
Inheritance
MemberParser
Implements
Inherited Members
Extension Methods

Remarks

This class is used during the "Completion" phase of object parsing, where an existing instance is populated with additional data not provided to the constructor.

Constructors

MemberParser(MemberInfo, ParamInfo)

Initializes a new instance of the MemberParser class.

public MemberParser(MemberInfo Member, ParamInfo Param)

Parameters

Member MemberInfo

The property, field, or method to map.

Param ParamInfo

The column matching rules for the member.

Exceptions

Exception

Thrown if the member is static, read-only, or type-mismatched.

Fields

Member

The reflection metadata for the member being populated.

public readonly MemberInfo Member

Field Value

MemberInfo

Param

The matcher that negotiates the data type and column name for this member.

public readonly ParamInfo Param

Field Value

ParamInfo

TargetType

The type of the class that owns or receives this member assignment.

public readonly Type TargetType

Field Value

Type

Methods

TryNew(MemberInfo, ParamInfo, out MemberParser, bool)

Attempts to create a new MemberParser.

public static bool TryNew(MemberInfo member, ParamInfo param, out MemberParser memberParser, bool allowNonPublicSetter = false)

Parameters

member MemberInfo

The candidate member for parsing.

param ParamInfo

The matcher to associate with the member.

memberParser MemberParser

When this method returns, contains the parser if successful, otherwise null.

allowNonPublicSetter bool

Whether a non-public property setter may be used.

Returns

bool

true if the member is a valid, writable target, otherwise false.