コード例 #1
0
ファイル: TypeMapper.cs プロジェクト: Gremlin2/bookscanner
 public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex)
 {
     if(source.IsNull(sourceObject, sourceIndex))
     {
         destination.SetFloat(destinationObject, destinationIndex, 0);
     }
     else
     {
         destination.SetFloat(destinationObject, destinationIndex, Convert.ToSingle(source.GetString(sourceObject, sourceIndex)));
     }
 }
コード例 #2
0
ファイル: TypeMapper.cs プロジェクト: Gremlin2/bookscanner
 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, source.GetString(sourceObject, sourceIndex));
     }
 }
コード例 #3
0
ファイル: TypeMapper.cs プロジェクト: Gremlin2/bookscanner
 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.GetString(sourceObject, sourceIndex)));
     }
 }