0
|
1 using BLToolkit.Reflection;
|
|
2
|
|
3 namespace BLToolkit.Mapping
|
|
4 {
|
|
5 public class TextDataListMapper : IMapDataDestinationList
|
|
6 {
|
|
7 public TextDataListMapper(TextDataMapper mapper)
|
|
8 {
|
|
9 _mapper = mapper;
|
|
10 }
|
|
11
|
|
12 public TextDataListMapper(TextDataWriter writer)
|
|
13 : this(new TextDataMapper(writer))
|
|
14 {
|
|
15 }
|
|
16
|
|
17 private readonly TextDataMapper _mapper;
|
|
18
|
|
19 #region IMapDataDestinationList Members
|
|
20
|
|
21 void IMapDataDestinationList.InitMapping(InitContext initContext)
|
|
22 {
|
|
23 }
|
|
24
|
|
25 IMapDataDestination IMapDataDestinationList.GetDataDestination(InitContext initContext)
|
|
26 {
|
|
27 return _mapper;
|
|
28 }
|
|
29
|
|
30 object IMapDataDestinationList.GetNextObject(InitContext initContext)
|
|
31 {
|
|
32 return _mapper.Writer;
|
|
33 }
|
|
34
|
|
35 void IMapDataDestinationList.EndMapping(InitContext initContext)
|
|
36 {
|
|
37 _mapper.WriteEnd();
|
|
38 }
|
|
39
|
|
40 #endregion
|
|
41 }
|
|
42 }
|