Regenerated code files
This commit is contained in:
@@ -194,6 +194,18 @@ public class Reader {
|
||||
default:
|
||||
continue; //should never happen.
|
||||
}
|
||||
|
||||
var type = field.FieldType;
|
||||
var valType = value?.GetType();
|
||||
if (valType != null && type != valType) {
|
||||
if (type.IsArray && valType.IsArray) {
|
||||
var array = (Array)value;
|
||||
var newArray = Array.CreateInstance(type.GetElementType()!, array.Length);
|
||||
Array.Copy(array, newArray, array.Length);
|
||||
value = newArray;
|
||||
}
|
||||
}
|
||||
|
||||
field.SetValue(obj, value);
|
||||
|
||||
//Add the freshly handled object to the database
|
||||
|
||||
Reference in New Issue
Block a user