示例#1
0
 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.GetInt32(sourceObject, sourceIndex)));
     }
 }
示例#2
0
 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.GetInt32(sourceObject, sourceIndex)));
     }
 }
示例#3
0
 sealed class EI32 <E> : MB <E>           { public override E           From(IMapDataSource s, object o, int i)
                                            {
                                                return((E)(object)s.GetInt32(o, i));
                                            }
示例#4
0
 sealed class NEI32 <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.GetInt32(o, i));
                                                     }
示例#5
0
 sealed class I32 : MB <Int32>       { public override Int32       From(IMapDataSource s, object o, int i)
                                       {
                                           return(s.GetInt32(o, i));
                                       }