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.GetInt64(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.GetInt64(sourceObject, sourceIndex))); } }
sealed class EI64 <E> : MB <E> { public override E From(IMapDataSource s, object o, int i) { return((E)(object)s.GetInt64(o, i)); }
sealed class NEI64 <E> : MB <E?> where E : struct { public override E?From(IMapDataSource s, object o, int i) { return /*s.IsNull(o, i) ? (E?)null :*/ ((E)(object)s.GetInt64(o, i)); }
sealed class I64 : MB <Int64> { public override Int64 From(IMapDataSource s, object o, int i) { return(s.GetInt64(o, i)); }