Regenerated code files

This commit is contained in:
Samuele Lorefice
2025-03-11 19:12:04 +01:00
parent 3756f864ed
commit c30467acc5
651 changed files with 2043 additions and 1940 deletions

View File

@@ -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