Mercurial > pub > bltoolkit
comparison Source/Mapping/MapDataDestinationBase.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 using System.Data.SqlTypes; | |
3 | |
4 namespace BLToolkit.Mapping | |
5 { | |
6 public abstract class MapDataDestinationBase : IMapDataDestination | |
7 { | |
8 #region IMapDataDestination Members | |
9 | |
10 public abstract Type GetFieldType(int index); | |
11 | |
12 public abstract int GetOrdinal (string name); | |
13 public abstract void SetValue (object o, int index, object value); | |
14 public abstract void SetValue (object o, string name, object value); | |
15 | |
16 public virtual void SetNull (object o, int index) { SetValue(o, index, null); } | |
17 | |
18 public virtual bool SupportsTypedValues(int index) { return true; } | |
19 | |
20 // Simple types setters. | |
21 // | |
22 [CLSCompliant(false)] | |
23 public virtual void SetSByte (object o, int index, SByte value) { SetValue(o, index, value); } | |
24 public virtual void SetInt16 (object o, int index, Int16 value) { SetValue(o, index, value); } | |
25 public virtual void SetInt32 (object o, int index, Int32 value) { SetValue(o, index, value); } | |
26 public virtual void SetInt64 (object o, int index, Int64 value) { SetValue(o, index, value); } | |
27 | |
28 public virtual void SetByte (object o, int index, Byte value) { SetValue(o, index, value); } | |
29 [CLSCompliant(false)] | |
30 public virtual void SetUInt16 (object o, int index, UInt16 value) { SetValue(o, index, value); } | |
31 [CLSCompliant(false)] | |
32 public virtual void SetUInt32 (object o, int index, UInt32 value) { SetValue(o, index, value); } | |
33 [CLSCompliant(false)] | |
34 public virtual void SetUInt64 (object o, int index, UInt64 value) { SetValue(o, index, value); } | |
35 | |
36 public virtual void SetBoolean (object o, int index, Boolean value) { SetValue(o, index, value); } | |
37 public virtual void SetChar (object o, int index, Char value) { SetValue(o, index, value); } | |
38 public virtual void SetSingle (object o, int index, Single value) { SetValue(o, index, value); } | |
39 public virtual void SetDouble (object o, int index, Double value) { SetValue(o, index, value); } | |
40 public virtual void SetDecimal (object o, int index, Decimal value) { SetValue(o, index, value); } | |
41 public virtual void SetGuid (object o, int index, Guid value) { SetValue(o, index, value); } | |
42 public virtual void SetDateTime (object o, int index, DateTime value) { SetValue(o, index, value); } | |
43 public virtual void SetDateTimeOffset(object o, int index, DateTimeOffset value) { SetValue(o, index, value); } | |
44 | |
45 // Nullable types setters. | |
46 // | |
47 [CLSCompliant(false)] | |
48 public virtual void SetNullableSByte (object o, int index, SByte? value) { SetValue(o, index, value); } | |
49 public virtual void SetNullableInt16 (object o, int index, Int16? value) { SetValue(o, index, value); } | |
50 public virtual void SetNullableInt32 (object o, int index, Int32? value) { SetValue(o, index, value); } | |
51 public virtual void SetNullableInt64 (object o, int index, Int64? value) { SetValue(o, index, value); } | |
52 | |
53 public virtual void SetNullableByte (object o, int index, Byte? value) { SetValue(o, index, value); } | |
54 [CLSCompliant(false)] | |
55 public virtual void SetNullableUInt16 (object o, int index, UInt16? value) { SetValue(o, index, value); } | |
56 [CLSCompliant(false)] | |
57 public virtual void SetNullableUInt32 (object o, int index, UInt32? value) { SetValue(o, index, value); } | |
58 [CLSCompliant(false)] | |
59 public virtual void SetNullableUInt64 (object o, int index, UInt64? value) { SetValue(o, index, value); } | |
60 | |
61 public virtual void SetNullableBoolean (object o, int index, Boolean? value) { SetValue(o, index, value); } | |
62 public virtual void SetNullableChar (object o, int index, Char? value) { SetValue(o, index, value); } | |
63 public virtual void SetNullableSingle (object o, int index, Single? value) { SetValue(o, index, value); } | |
64 public virtual void SetNullableDouble (object o, int index, Double? value) { SetValue(o, index, value); } | |
65 public virtual void SetNullableDecimal (object o, int index, Decimal? value) { SetValue(o, index, value); } | |
66 public virtual void SetNullableGuid (object o, int index, Guid? value) { SetValue(o, index, value); } | |
67 public virtual void SetNullableDateTime(object o, int index, DateTime? value) { SetValue(o, index, value); } | |
68 public virtual void SetNullableDateTimeOffset(object o, int index, DateTimeOffset? value) { SetValue(o, index, value); } | |
69 | |
70 #if !SILVERLIGHT | |
71 | |
72 // SQL type setters. | |
73 // | |
74 public virtual void SetSqlByte (object o, int index, SqlByte value) { SetValue(o, index, value); } | |
75 public virtual void SetSqlInt16 (object o, int index, SqlInt16 value) { SetValue(o, index, value); } | |
76 public virtual void SetSqlInt32 (object o, int index, SqlInt32 value) { SetValue(o, index, value); } | |
77 public virtual void SetSqlInt64 (object o, int index, SqlInt64 value) { SetValue(o, index, value); } | |
78 public virtual void SetSqlSingle (object o, int index, SqlSingle value) { SetValue(o, index, value); } | |
79 public virtual void SetSqlBoolean (object o, int index, SqlBoolean value) { SetValue(o, index, value); } | |
80 public virtual void SetSqlDouble (object o, int index, SqlDouble value) { SetValue(o, index, value); } | |
81 public virtual void SetSqlDateTime(object o, int index, SqlDateTime value) { SetValue(o, index, value); } | |
82 public virtual void SetSqlDecimal (object o, int index, SqlDecimal value) { SetValue(o, index, value); } | |
83 public virtual void SetSqlMoney (object o, int index, SqlMoney value) { SetValue(o, index, value); } | |
84 public virtual void SetSqlGuid (object o, int index, SqlGuid value) { SetValue(o, index, value); } | |
85 public virtual void SetSqlString (object o, int index, SqlString value) { SetValue(o, index, value); } | |
86 | |
87 #endif | |
88 | |
89 #endregion | |
90 } | |
91 } |