正在新增编译缓存功能,用于加速与加密

This commit is contained in:
2025-10-17 15:46:44 +08:00
parent 52e8e85542
commit d3e21cad15
15 changed files with 310 additions and 31 deletions

View File

@@ -25,7 +25,14 @@ namespace Convention.RScript
internalData = value;
return;
}
if (type == typeof(object) || type == value.GetType())
if (value == null)
{
if (type.IsClass)
internalData = null;
else
internalData = Activator.CreateInstance(type);
}
else if (type == typeof(object) || type == value.GetType())
internalData = value;
else
internalData = Convert.ChangeType(value, type);