From ce0e98ad3037ea022609bab61bb922b406b2bfd3 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 28 Feb 2009 14:12:18 +0000 Subject: [PATCH] Added support for Field/Properties of type uint to the Util.ReadSettingsFromIniFile method. --- OpenSim/Framework/Util.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1d82644caf..a0f35671f8 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -956,6 +956,10 @@ namespace OpenSim.Framework { fieldInfo.SetValue(settingsClass, config.GetFloat(fieldInfo.Name, (float)fieldInfo.GetValue(settingsClass))); } + else if (fieldInfo.FieldType == typeof(System.UInt32)) + { + fieldInfo.SetValue(settingsClass, System.Convert.ToUInt32(config.Get(fieldInfo.Name, ((uint)fieldInfo.GetValue(settingsClass)).ToString()))); + } } PropertyInfo[] propertyInfos = settingsType.GetProperties(); @@ -979,6 +983,10 @@ namespace OpenSim.Framework { propInfo.SetValue(settingsClass, config.GetFloat(propInfo.Name, (float)propInfo.GetValue(settingsClass, null)), null); } + if (propInfo.PropertyType == typeof(System.UInt32)) + { + propInfo.SetValue(settingsClass, System.Convert.ToUInt32(config.Get(propInfo.Name, ((uint)propInfo.GetValue(settingsClass, null)).ToString())), null); + } } }