comparison Source/Mapping/TextDataMapper.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 System;
2
3 namespace BLToolkit.Mapping
4 {
5 public class TextDataMapper : MapDataDestinationBase
6 {
7 public TextDataMapper(TextDataWriter writer)
8 {
9 if (writer == null) throw new ArgumentNullException("writer");
10
11 _writer = writer;
12 }
13
14 private readonly TextDataWriter _writer;
15 public TextDataWriter Writer
16 {
17 get { return _writer; }
18 }
19
20 public virtual void WriteEnd()
21 {
22 _writer.WriteEnd();
23 }
24
25 public override Type GetFieldType(int index)
26 {
27 return _writer.GetFieldType(index);
28 }
29
30 public override int GetOrdinal(string name)
31 {
32 return _writer.GetOrdinal(name);
33 }
34
35 public override void SetValue(object o, int index, object value)
36 {
37 _writer.SetValue(index, value);
38 }
39
40 public override void SetValue(object o, string name, object value)
41 {
42 _writer.SetValue(name, value);
43 }
44 }
45 }