Class FieldMap
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
memberPropertyOrFieldInfoThe 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
memberPropertyOrFieldInfoThe member information (property or field) to map.
indexintThe 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
memberPropertyOrFieldInfoThe member information (property or field) to map.
namestringThe 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
Methods
GetValue(IDataRecord)
Retrieves the value from the data record for the mapped field.
public object GetValue(IDataRecord record)
Parameters
recordIDataRecordThe data record to retrieve the value from.
Returns
- object
The value of the field from the data record.