!16 配置文件加载string类型为null时,使用默认值赋值。
Merge pull request !16 from dazuo0312/master
This commit is contained in:
commit
fd36840f25
@ -268,7 +268,7 @@ namespace Sunny.UI
|
|||||||
if (type == typeof(string))
|
if (type == typeof(string))
|
||||||
{
|
{
|
||||||
object value = idents[info.Name].Value;
|
object value = idents[info.Name].Value;
|
||||||
info.SetValue(config, Convert.ChangeType(value, type), null);
|
info.SetValue(config, Convert.ChangeType(value==null? defaultobj: value, type), null);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user