C# Class Dibware.StoredProcedureFramework.Helpers.DateReaderRecordToObjectMapper

Maps the fields of a data reader record into
Show file Open project: dibley1973/StoredProcedureFramework

Private Properties

Property Type Description
BuildTargetConstructor void
BuildTargetProperties void
ClearMappedTarget void
CreateNewTargetObject void
EnsureTargetContructrorExists void
GetCurrentPropertyType System.Type
GetIfCurrentPropertyNullableType bool
HandleCastingExceptions void
HandleMissingFieldExceptions void
HandleOtherExceptions void
ReadRecordFieldValuesIntoCurrentTargetProperties void
SetCurrentFieldNameFromCurrentPropertyAttributeOrPropertyName void
SetCurrentFieldValueFromReader void
SetCurrentProperty void
SetTargetPropertyFromCurrentFieldValue void
TrySetTargetPropertyNullValue void

Public Methods

Method Description
DateReaderRecordToObjectMapper ( IDataReader dataReader, Type targetType ) : System

Initializes a new instance of the DateReaderRecordToObjectMapper class.

PopulateMappedTargetFromReaderRecord ( ) : void

Creates an object of the target type using the current record of the DataReader and populates the MappedTarget property with it.

Private Methods

Method Description
BuildTargetConstructor ( ) : void
BuildTargetProperties ( ) : void
ClearMappedTarget ( ) : void
CreateNewTargetObject ( ) : void
EnsureTargetContructrorExists ( ) : void
GetCurrentPropertyType ( ) : Type
GetIfCurrentPropertyNullableType ( ) : bool
HandleCastingExceptions ( Exception ex ) : void
HandleMissingFieldExceptions ( Exception ex ) : void
HandleOtherExceptions ( Exception ex ) : void
ReadRecordFieldValuesIntoCurrentTargetProperties ( ) : void
SetCurrentFieldNameFromCurrentPropertyAttributeOrPropertyName ( ) : void
SetCurrentFieldValueFromReader ( ) : void
SetCurrentProperty ( PropertyInfo property ) : void
SetTargetPropertyFromCurrentFieldValue ( ) : void
TrySetTargetPropertyNullValue ( ) : void

Method Details

DateReaderRecordToObjectMapper() public method

Initializes a new instance of the DateReaderRecordToObjectMapper class.
/// dataReader /// or /// targetType ///
public DateReaderRecordToObjectMapper ( IDataReader dataReader, Type targetType ) : System
dataReader IDataReader /// The data reader which is to be used to populate the target. ///
targetType System.Type /// The Type of the tapped target object. ///
return System

PopulateMappedTargetFromReaderRecord() public method

Creates an object of the target type using the current record of the DataReader and populates the MappedTarget property with it.
public PopulateMappedTargetFromReaderRecord ( ) : void
return void