Added support for Field/Properties of type uint to the Util.ReadSettingsFromIniFile method.

GenericGridServerConcept
MW 2009-02-28 14:12:18 +00:00
parent bb1823a7ad
commit ce0e98ad30
1 changed files with 8 additions and 0 deletions

View File

@ -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);
}
}
}