sealed class NI16 : MB <Int16?> { public override void To(IMapDataDestination d, object o, int i, Int16?v) { d.SetNullableInt16(o, i, v); }
public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex) { if(source.IsNull(sourceObject, sourceIndex)) { destination.SetNullableInt16(destinationObject, destinationIndex, null); } else { destination.SetNullableInt16(destinationObject, destinationIndex, Convert.ToInt16(source.GetString(sourceObject, sourceIndex))); } }