Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/api-shared/ObjCRuntime/Registrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ class RegistrationTestClass : NSObject {}

public static Registrars CurrentRegistrar {
get {
var find_type = typeof (Class).GetMethod ("FindType", BindingFlags.Static | BindingFlags.NonPublic);
#if NET
var types = new Type [] { typeof (NativeHandle), typeof (bool).MakeByRefType () };
#else
var types = new Type [] { typeof (IntPtr), typeof (bool).MakeByRefType () };
#endif
var find_type = typeof (Class).GetMethod ("FindType", BindingFlags.Static | BindingFlags.NonPublic, null, types, null);
var type_to_find = typeof (RegistrationTestClass);
var type = (Type) find_type.Invoke (null, new object [] { Class.GetHandle (type_to_find), false });
var is_static = type_to_find == type;
Expand Down