aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Base/BaseDataReader.cs
diff options
context:
space:
mode:
authorJeff Ames2008-06-26 20:20:30 +0000
committerJeff Ames2008-06-26 20:20:30 +0000
commitd96caaa14e9e869e85eecc6b760221ad0579f68e (patch)
treeccb720f2b7df128d9db0285c58ee6cc63a291ba8 /OpenSim/Data/Base/BaseDataReader.cs
parentApply patch from bug #1605 -- Documentation for Data/SQLite. Thanks kerunix_... (diff)
downloadopensim-SC-d96caaa14e9e869e85eecc6b760221ad0579f68e.zip
opensim-SC-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.gz
opensim-SC-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.bz2
opensim-SC-d96caaa14e9e869e85eecc6b760221ad0579f68e.tar.xz
Apply patch from bug #1606 -- Documentation for Data/Null, Data/Base. Thanks kerunix_Flan!
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Base/BaseDataReader.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs
index 517f672..23f03e5 100644
--- a/OpenSim/Data/Base/BaseDataReader.cs
+++ b/OpenSim/Data/Base/BaseDataReader.cs
@@ -31,25 +31,47 @@ using System.IO;
31 31
32namespace OpenSim.Data.Base 32namespace OpenSim.Data.Base
33{ 33{
34 /// <summary>
35 ///
36 /// </summary>
34 public abstract class BaseDataReader 37 public abstract class BaseDataReader
35 { 38 {
36 private readonly IDataReader m_source; 39 private readonly IDataReader m_source;
37 40
41 /// <summary>
42 ///
43 /// </summary>
44 /// <param name="source"></param>
38 public BaseDataReader(IDataReader source) 45 public BaseDataReader(IDataReader source)
39 { 46 {
40 m_source = source; 47 m_source = source;
41 } 48 }
42 49
50 /// <summary>
51 ///
52 /// </summary>
53 /// <param name="name"></param>
54 /// <returns></returns>
43 public object Get(string name) 55 public object Get(string name)
44 { 56 {
45 return m_source[name]; 57 return m_source[name];
46 } 58 }
47 59
60 /// <summary>
61 ///
62 /// </summary>
63 /// <param name="name"></param>
64 /// <returns></returns>
48 public ushort GetUShort(string name) 65 public ushort GetUShort(string name)
49 { 66 {
50 return (ushort)m_source.GetInt32(m_source.GetOrdinal(name)); 67 return (ushort)m_source.GetInt32(m_source.GetOrdinal(name));
51 } 68 }
52 69
70 /// <summary>
71 ///
72 /// </summary>
73 /// <param name="name"></param>
74 /// <returns></returns>
53 public byte GetByte(string name) 75 public byte GetByte(string name)
54 { 76 {
55 int ordinal = m_source.GetOrdinal(name); 77 int ordinal = m_source.GetOrdinal(name);
@@ -57,16 +79,31 @@ namespace OpenSim.Data.Base
57 return value; 79 return value;
58 } 80 }
59 81
82 /// <summary>
83 ///
84 /// </summary>
85 /// <param name="name"></param>
86 /// <returns></returns>
60 public sbyte GetSByte(string name) 87 public sbyte GetSByte(string name)
61 { 88 {
62 return (sbyte)m_source.GetInt16(m_source.GetOrdinal(name)); 89 return (sbyte)m_source.GetInt16(m_source.GetOrdinal(name));
63 } 90 }
64 91
92 /// <summary>
93 ///
94 /// </summary>
95 /// <param name="name"></param>
96 /// <returns></returns>
65 public float GetFloat(string name) 97 public float GetFloat(string name)
66 { 98 {
67 return m_source.GetFloat(m_source.GetOrdinal(name)); 99 return m_source.GetFloat(m_source.GetOrdinal(name));
68 } 100 }
69 101
102 /// <summary>
103 ///
104 /// </summary>
105 /// <param name="name"></param>
106 /// <returns></returns>
70 public byte[] GetBytes(string name) 107 public byte[] GetBytes(string name)
71 { 108 {
72 int ordinal = m_source.GetOrdinal(name); 109 int ordinal = m_source.GetOrdinal(name);
@@ -94,6 +131,11 @@ namespace OpenSim.Data.Base
94 return memStream.ToArray(); 131 return memStream.ToArray();
95 } 132 }
96 133
134 /// <summary>
135 ///
136 /// </summary>
137 /// <param name="name"></param>
138 /// <returns></returns>
97 public string GetString(string name) 139 public string GetString(string name)
98 { 140 {
99 int ordinal = m_source.GetOrdinal(name); 141 int ordinal = m_source.GetOrdinal(name);
@@ -107,21 +149,40 @@ namespace OpenSim.Data.Base
107 return (string)value; 149 return (string)value;
108 } 150 }
109 151
152 /// <summary>
153 ///
154 /// </summary>
155 /// <returns></returns>
110 public bool Read() 156 public bool Read()
111 { 157 {
112 return m_source.Read(); 158 return m_source.Read();
113 } 159 }
114 160
161 /// <summary>
162 ///
163 /// </summary>
164 /// <param name="name"></param>
165 /// <returns></returns>
115 public virtual Guid GetGuid(string name) 166 public virtual Guid GetGuid(string name)
116 { 167 {
117 return m_source.GetGuid(m_source.GetOrdinal(name)); 168 return m_source.GetGuid(m_source.GetOrdinal(name));
118 } 169 }
119 170
171 /// <summary>
172 ///
173 /// </summary>
174 /// <param name="name"></param>
175 /// <returns></returns>
120 public UInt32 GetUInt32(string name) 176 public UInt32 GetUInt32(string name)
121 { 177 {
122 return (UInt32)GetInt32(name); 178 return (UInt32)GetInt32(name);
123 } 179 }
124 180
181 /// <summary>
182 ///
183 /// </summary>
184 /// <param name="name"></param>
185 /// <returns></returns>
125 private Int32 GetInt32(string name) 186 private Int32 GetInt32(string name)
126 { 187 {
127 int ordinal = m_source.GetOrdinal(name); 188 int ordinal = m_source.GetOrdinal(name);
@@ -129,6 +190,11 @@ namespace OpenSim.Data.Base
129 return int32; 190 return int32;
130 } 191 }
131 192
193 /// <summary>
194 ///
195 /// </summary>
196 /// <param name="name"></param>
197 /// <returns></returns>
132 public Int64 GetInt64(string name) 198 public Int64 GetInt64(string name)
133 { 199 {
134 int ordinal = m_source.GetOrdinal(name); 200 int ordinal = m_source.GetOrdinal(name);