diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.Base/BaseDataReader.cs | 33 | ||||
-rw-r--r-- | OpenSim/Framework/Data.Base/BaseFieldMapper.cs | 4 |
2 files changed, 26 insertions, 11 deletions
diff --git a/OpenSim/Framework/Data.Base/BaseDataReader.cs b/OpenSim/Framework/Data.Base/BaseDataReader.cs index cbaac55..3baefcd 100644 --- a/OpenSim/Framework/Data.Base/BaseDataReader.cs +++ b/OpenSim/Framework/Data.Base/BaseDataReader.cs | |||
@@ -31,7 +31,7 @@ using System.IO; | |||
31 | 31 | ||
32 | namespace OpenSim.Framework.Data.Base | 32 | namespace OpenSim.Framework.Data.Base |
33 | { | 33 | { |
34 | public class BaseDataReader | 34 | public abstract class BaseDataReader |
35 | { | 35 | { |
36 | private readonly IDataReader m_source; | 36 | private readonly IDataReader m_source; |
37 | 37 | ||
@@ -112,17 +112,28 @@ namespace OpenSim.Framework.Data.Base | |||
112 | return m_source.Read(); | 112 | return m_source.Read(); |
113 | } | 113 | } |
114 | 114 | ||
115 | public Guid GetGuid(string name) | 115 | public virtual Guid GetGuid(string name) |
116 | { | 116 | { |
117 | string guidString = GetString(name); | 117 | return m_source.GetGuid(m_source.GetOrdinal(name)); |
118 | if (String.IsNullOrEmpty(guidString)) | 118 | } |
119 | { | 119 | |
120 | return Guid.Empty; | 120 | public UInt32 GetUInt32(string name ) |
121 | } | 121 | { |
122 | else | 122 | return (UInt32)GetInt32(name); |
123 | { | 123 | } |
124 | return new Guid(guidString); | 124 | |
125 | } | 125 | private Int32 GetInt32(string name) |
126 | { | ||
127 | int ordinal = m_source.GetOrdinal(name); | ||
128 | int int32 = m_source.GetInt32(ordinal); | ||
129 | return int32; | ||
130 | } | ||
131 | |||
132 | public Int64 GetInt64(string name) | ||
133 | { | ||
134 | int ordinal = m_source.GetOrdinal( name ); | ||
135 | long int64 = m_source.GetInt64(ordinal); | ||
136 | return int64; | ||
126 | } | 137 | } |
127 | } | 138 | } |
128 | } | 139 | } |
diff --git a/OpenSim/Framework/Data.Base/BaseFieldMapper.cs b/OpenSim/Framework/Data.Base/BaseFieldMapper.cs index ade9266..03c7bfb 100644 --- a/OpenSim/Framework/Data.Base/BaseFieldMapper.cs +++ b/OpenSim/Framework/Data.Base/BaseFieldMapper.cs | |||
@@ -108,6 +108,10 @@ namespace OpenSim.Framework.Data.Base | |||
108 | { | 108 | { |
109 | value = reader.GetUShort(m_fieldName); | 109 | value = reader.GetUShort(m_fieldName); |
110 | } | 110 | } |
111 | else if (ValueType == typeof(uint)) | ||
112 | { | ||
113 | value = reader.GetUInt32(m_fieldName); | ||
114 | } | ||
111 | else if (ValueType == typeof(byte[])) | 115 | else if (ValueType == typeof(byte[])) |
112 | { | 116 | { |
113 | value = reader.GetBytes(m_fieldName); | 117 | value = reader.GetBytes(m_fieldName); |