#include "mono/metadata/icall-decl.h"
#include "mono/metadata/loader-internals.h"
#include "mono/metadata/loaded-images-internals.h"
+#include "mono/metadata/mono-private-unstable.h"
#include "mono/utils/mono-error-internals.h"
#include "mono/utils/mono-logger-internals.h"
return alc;
}
+MonoGCHandle
+mono_alc_get_default_gchandle (void)
+{
+ // Because the default domain is never unloadable, this should be a strong handle and never change
+ return mono_domain_default_alc (mono_domain_get ())->gchandle;
+}
+
static MonoAssembly*
invoke_resolve_method (MonoMethod *resolve_method, MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, MonoError *error)
{
typedef MonoGCHandle MonoAssemblyLoadContextGCHandle;
-MONO_API MONO_RT_EXTERNAL_ONLY
-MonoAssembly *mono_assembly_load_full_alc (MonoAssemblyLoadContextGCHandle alc_gchandle, MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status);
+MONO_API MONO_RT_EXTERNAL_ONLY MonoAssembly *
+mono_assembly_load_full_alc (MonoAssemblyLoadContextGCHandle alc_gchandle, MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status);
typedef MonoAssembly * (*MonoAssemblyPreLoadFuncV3) (MonoAssemblyLoadContextGCHandle *alc_gchandle, MonoAssemblyName *aname, char **assemblies_path, gpointer user_data, MonoError *error);
-void mono_install_assembly_preload_hook_v3 (MonoAssemblyPreLoadFuncV3 func, gpointer user_data, gboolean append);
+
+MONO_API MONO_RT_EXTERNAL_ONLY void
+mono_install_assembly_preload_hook_v3 (MonoAssemblyPreLoadFuncV3 func, gpointer user_data, gboolean append);
+
+MONO_API MONO_RT_EXTERNAL_ONLY MonoAssemblyLoadContextGCHandle
+mono_alc_get_default_gchandle (void);
#endif /*__MONO_METADATA_MONO_PRIVATE_UNSTABLE_H__*/