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.GetNullableBoolean(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, Convert.ToString(source.GetNullableBoolean(sourceObject, sourceIndex))); } }
sealed class NB : MB <Boolean?> { public override Boolean?From(IMapDataSource s, object o, int i) { return(s.GetNullableBoolean(o, i)); }