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