Added support for Field/Properties of type uint to the Util.ReadSettingsFromIniFile method.
parent
bb1823a7ad
commit
ce0e98ad30
|
@ -956,6 +956,10 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
fieldInfo.SetValue(settingsClass, config.GetFloat(fieldInfo.Name, (float)fieldInfo.GetValue(settingsClass)));
|
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();
|
PropertyInfo[] propertyInfos = settingsType.GetProperties();
|
||||||
|
@ -979,6 +983,10 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
propInfo.SetValue(settingsClass, config.GetFloat(propInfo.Name, (float)propInfo.GetValue(settingsClass, null)), null);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue