Table of Contents

Class FieldMap

Namespace
Utils.Data
Assembly
Utils.Data.dll

Represents a mapping between a field in a data record and a class member (property or field).

public class FieldMap
Inheritance
FieldMap
Inherited Members
Extension Methods

Constructors

FieldMap(PropertyOrFieldInfo)

Initializes a new instance of the FieldMap class using the specified member (property or field). The field name or index is derived from the Utils.Data.FieldMap.FieldAttribute if present.

public FieldMap(PropertyOrFieldInfo member)

Parameters

member PropertyOrFieldInfo

The member information (property or field) to map.

FieldMap(PropertyOrFieldInfo, int)

Initializes a new instance of the FieldMap class using a specific field index.

public FieldMap(PropertyOrFieldInfo member, int index)

Parameters

member PropertyOrFieldInfo

The member information (property or field) to map.

index int

The index of the field in the data record.

FieldMap(PropertyOrFieldInfo, string)

Initializes a new instance of the FieldMap class using a specific field name.

public FieldMap(PropertyOrFieldInfo member, string name)

Parameters

member PropertyOrFieldInfo

The member information (property or field) to map.

name string

The name of the field in the data record.

Properties

Member

Gets the member information (property or field) being mapped.

public PropertyOrFieldInfo Member { get; }

Property Value

PropertyOrFieldInfo

Methods

GetValue(IDataRecord)

Retrieves the value from the data record for the mapped field.

public object GetValue(IDataRecord record)

Parameters

record IDataRecord

The data record to retrieve the value from.

Returns

object

The value of the field from the data record.