Ejemplo n.º 1
0
 public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex)
 {
     if(source.IsNull(sourceObject, sourceIndex))
     {
         destination.SetDecimal(destinationObject, destinationIndex, 0);
     }
     else
     {
         destination.SetDecimal(destinationObject, destinationIndex, Convert.ToDecimal(source.GetByte(sourceObject, sourceIndex)));
     }
 }
Ejemplo n.º 2
0
 public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex)
 {
     if(source.IsNull(sourceObject, sourceIndex))
     {
         destination.SetNullableFloat(destinationObject, destinationIndex, null);
     }
     else
     {
         destination.SetNullableFloat(destinationObject, destinationIndex, Convert.ToSingle(source.GetByte(sourceObject, sourceIndex)));
     }
 }
Ejemplo n.º 3
0
 sealed class EU8 <E> : MB <E>           { public override E           From(IMapDataSource s, object o, int i)
                                           {
                                               return((E)(object)s.GetByte(o, i));
                                           }
Ejemplo n.º 4
0
 sealed class NEU8 <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.GetByte(o, i));
                                                    }
Ejemplo n.º 5
0
 sealed class U8 : MB <Byte>        { public override Byte        From(IMapDataSource s, object o, int i)
                                      {
                                          return(s.GetByte(o, i));
                                      }