Add attributes support for dotnet interop for methods, fields and properties

This commit is contained in:
Wojtek Figat
2024-10-04 15:57:41 +02:00
parent 1414eb9852
commit e860f969be
4 changed files with 107 additions and 57 deletions

View File

@@ -38,11 +38,13 @@ namespace FlaxEngine.Interop
private static ConcurrentDictionary<IntPtr, Delegate> cachedDelegates = new();
private static Dictionary<Type, (TypeHolder typeHolder, ManagedHandle handle)> managedTypes = new(new TypeComparer());
private static List<ManagedHandle> fieldHandleCache = new();
private static List<ManagedHandle> propertyHandleCache = new();
#if FLAX_EDITOR
private static List<ManagedHandle> methodHandlesCollectible = new();
private static ConcurrentDictionary<IntPtr, Delegate> cachedDelegatesCollectible = new();
private static Dictionary<Type, (TypeHolder typeHolder, ManagedHandle handle)> managedTypesCollectible = new(new TypeComparer());
private static List<ManagedHandle> fieldHandleCacheCollectible = new();
private static List<ManagedHandle> propertyHandleCacheCollectible = new();
#endif
private static Dictionary<object, ManagedHandle> classAttributesCacheCollectible = new();
private static Dictionary<Assembly, ManagedHandle> assemblyHandles = new();