Implement missing dotnet7 interop for field and stabilize interop

This commit is contained in:
Wojtek Figat
2023-07-04 17:57:59 +02:00
parent d7dc0b76e5
commit c79952a4d6
4 changed files with 26 additions and 7 deletions

View File

@@ -1163,8 +1163,8 @@ MType* MField::GetType() const
int32 MField::GetOffset() const
{
MISSING_CODE("TODO: MField::GetOffset"); // TODO: MField::GetOffset
return 0;
static void* FieldGetOffsetPtr = GetStaticMethodPointer(TEXT("FieldGetOffset"));
return CallStaticMethod<int32, void*>(FieldGetOffsetPtr, _handle);
}
void MField::GetValue(MObject* instance, void* result) const
@@ -1175,8 +1175,8 @@ void MField::GetValue(MObject* instance, void* result) const
MObject* MField::GetValueBoxed(MObject* instance) const
{
MISSING_CODE("TODO: MField::GetValueBoxed"); // TODO: MField::GetValueBoxed
return nullptr;
static void* FieldGetValueBoxedPtr = GetStaticMethodPointer(TEXT("FieldGetValueBoxed"));
return CallStaticMethod<MObject*, void*, void*>(FieldGetValueBoxedPtr, instance, _handle);
}
void MField::SetValue(MObject* instance, void* value) const