0
|
1 using System;
|
|
2
|
|
3 using BLToolkit.Reflection;
|
|
4
|
|
5 namespace BLToolkit.Mapping
|
|
6 {
|
|
7 public class SimpleSourceListMapper : IMapDataSourceList
|
|
8 {
|
|
9 [CLSCompliant(false)]
|
|
10 public SimpleSourceListMapper(IMapDataSource mapper)
|
|
11 {
|
|
12 _mapper = mapper;
|
|
13 }
|
|
14
|
|
15 private readonly IMapDataSource _mapper;
|
|
16
|
|
17 #region IMapDataSourceList Members
|
|
18
|
|
19 public virtual void InitMapping(InitContext initContext)
|
|
20 {
|
|
21 }
|
|
22
|
|
23 public bool SetNextDataSource(InitContext initContext)
|
|
24 {
|
|
25 initContext.DataSource = _mapper;
|
|
26 return _mapper.Count > 0;
|
|
27 }
|
|
28
|
|
29 public virtual void EndMapping(InitContext initContext)
|
|
30 {
|
|
31 }
|
|
32
|
|
33 #endregion
|
|
34 }
|
|
35 }
|