@@ -162,6 +162,11 @@ public int GetHashCode((Type, string) key)
thrownewApplicationException($"Custom marshaler '{type.FullName}' does not implement a static GetInstance method that takes a single string parameter and returns an ICustomMarshaler.");
}
if(getInstanceMethod.ContainsGenericParameters)
{
thrownewSystem.TypeLoadException($"Custom marshaler '{type.FullName}' contains unassigned generic type parameter(s).");
mono_trace(G_LOG_LEVEL_DEBUG,MONO_TRACE_DLLIMPORT,"Component %s library does not have symbol %s: %s",component->name,component_init,mono_error_get_message_without_fields(symbol_error));
mono_trace(G_LOG_LEVEL_DEBUG,MONO_TRACE_DLLIMPORT,"Component library %s not found at %s: %s",component_base_lib,path,mono_error_get_message_without_fields(load_error));
else
mono_trace(G_LOG_LEVEL_DEBUG,MONO_TRACE_DLLIMPORT,"Component library %s found at %s",component_base_lib,path);
mono_mb_emit_exception_full(mb,"System.Runtime.InteropServices","MarshalDirectiveException",g_strdup_printf("custom marshalling of type %x is currently not supported",sig->params[i]->type));
returnemit_marshal_custom_ilgen_throw_exception(mb,"System","ApplicationException",g_strdup("Current profile doesn't support ICustomMarshaler"),action);
mono_error_set_generic_error(error,"System.Runtime.InteropServices","MarshalDirectiveException","custom marshalling of type %x is currently not supported",sig->params[i]->type);
g_error("Can not marshal string to native type '%02x': Invalid managed/unmanaged type combination (String fields must be paired with LPStr, LPWStr, BStr or ByValTStr).",mspec->native);
// TODO: Pass remaining flags on to LoadLibraryEx on Windows where appropriate, see https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportsearchpath?view=netcore-3.1
mono_trace(G_LOG_LEVEL_DEBUG,MONO_TRACE_PROFILER,"Found old-style startup symbol '%s' for the '%s' profiler; it has not been migrated to the new API.",old_name,name);