Пример #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.GetInt64(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.GetInt64(sourceObject, sourceIndex)));
     }
 }
Пример #3
0
 sealed class EI64 <E> : MB <E>           { public override E           From(IMapDataSource s, object o, int i)
                                            {
                                                return((E)(object)s.GetInt64(o, i));
                                            }
Пример #4
0
 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));
                                                     }
Пример #5
0
 sealed class I64 : MB <Int64>       { public override Int64       From(IMapDataSource s, object o, int i)
                                       {
                                           return(s.GetInt64(o, i));
                                       }