sealed class NU8 : MB <Byte?> { public override void To(IMapDataDestination d, object o, int i, Byte?v) { d.SetNullableByte(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.SetNullableByte(destinationObject, destinationIndex, null); } else { destination.SetNullableByte(destinationObject, destinationIndex, Convert.ToByte(source.GetString(sourceObject, sourceIndex))); } }