comparison Source/Mapping/DataReaderListMapper.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 using BLToolkit.Reflection;
2
3 namespace BLToolkit.Mapping
4 {
5 public class DataReaderListMapper : IMapDataSourceList
6 {
7 public DataReaderListMapper(DataReaderMapper mapper)
8 {
9 _mapper = mapper;
10 }
11
12 private readonly DataReaderMapper _mapper;
13
14 public virtual void InitMapping(InitContext initContext)
15 {
16 initContext.DataSource = _mapper;
17 initContext.SourceObject = _mapper.DataReader;
18 }
19
20 public virtual bool SetNextDataSource(InitContext initContext)
21 {
22 return _mapper.DataReader.Read();
23 }
24
25 public virtual void EndMapping(InitContext initContext)
26 {
27 }
28 }
29 }