public void Map( IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination dest, object destObject, int destIndex) { if (source.IsNull(sourceObject, sourceIndex)) { dest.SetNull(destObject, destIndex); } else { var setter = MapSetData <T> .I; var getter = MapGetData <T> .I; setter.To(dest, destObject, destIndex, getter.From(source, sourceObject, sourceIndex)); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetDecimal(destinationObject, destinationIndex, 0); } else { destination.SetDecimal(destinationObject, destinationIndex, Convert.ToDecimal(source.GetByte(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetFloat(destinationObject, destinationIndex, 0); } else { destination.SetFloat(destinationObject, destinationIndex, Convert.ToSingle(source.GetString(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetString(destinationObject, destinationIndex, null); } else { destination.SetString(destinationObject, destinationIndex, source.GetString(sourceObject, sourceIndex)); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetDateTime(destinationObject, destinationIndex, DateTime.MinValue); } else { destination.SetDateTime(destinationObject, destinationIndex, Convert.ToDateTime(source.GetString(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetNullableInt64(destinationObject, destinationIndex, null); } else { destination.SetNullableInt64(destinationObject, destinationIndex, Convert.ToInt64(source.GetFloat(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetBoolean(destinationObject, destinationIndex, false); } else { destination.SetBoolean(destinationObject, destinationIndex, Convert.ToBoolean(source.GetFloat(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetNullableDateTime(destinationObject, destinationIndex, null); } else { destination.SetNullableDateTime(destinationObject, destinationIndex, Convert.ToDateTime(source.GetBoolean(sourceObject, sourceIndex))); } }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetChar(destinationObject, destinationIndex, '\0'); } else { destination.SetChar(destinationObject, destinationIndex, Convert.ToChar(source.GetNullableInt32(sourceObject, sourceIndex))); } }