This commit is contained in:
parent
0423dc7c48
commit
f24513dd5a
|
@ -92,6 +92,11 @@ namespace BITKit
|
||||||
|
|
||||||
var type = BITSharp.GetTypeFromFullName(typeName);
|
var type = BITSharp.GetTypeFromFullName(typeName);
|
||||||
|
|
||||||
|
if (type is null)
|
||||||
|
{
|
||||||
|
throw new Exception($"反序列化时未找到类型:{typeName}");
|
||||||
|
}
|
||||||
|
|
||||||
var instance = System.Activator.CreateInstance(type);
|
var instance = System.Activator.CreateInstance(type);
|
||||||
|
|
||||||
if (instance is IBinarySerialize serialize)
|
if (instance is IBinarySerialize serialize)
|
||||||
|
|
Loading…
Reference in New Issue