From f2559f7e9e8bb293757c9f85efd1fd25384553a6 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 10 Oct 2016 16:22:45 +0200 Subject: [PATCH] [ObjCRuntime] Remove the IDynamicRegistrar interface. (#969) Remove the IDynamicRegistrar interface, since it's no longer needed (there's no OldDynamicRegistrar anymore, which means having an interface for a single type (DynamicRegistrar) is just code bloat at this point). --- src/ObjCRuntime/DynamicRegistrar.cs | 2 +- src/ObjCRuntime/IDynamicRegistrar.cs | 17 ----------------- src/ObjCRuntime/Runtime.cs | 3 +-- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/ObjCRuntime/DynamicRegistrar.cs b/src/ObjCRuntime/DynamicRegistrar.cs index d172f9b2b9..38f4173833 100644 --- a/src/ObjCRuntime/DynamicRegistrar.cs +++ b/src/ObjCRuntime/DynamicRegistrar.cs @@ -67,7 +67,7 @@ namespace XamCore.Registrar { } } - class DynamicRegistrar : Registrar, IDynamicRegistrar { + class DynamicRegistrar : Registrar { Dictionary type_map; Dictionary lazy_map; Dictionary > method_map; diff --git a/src/ObjCRuntime/IDynamicRegistrar.cs b/src/ObjCRuntime/IDynamicRegistrar.cs index 6bf09e7ae1..39008e481f 100644 --- a/src/ObjCRuntime/IDynamicRegistrar.cs +++ b/src/ObjCRuntime/IDynamicRegistrar.cs @@ -20,23 +20,6 @@ namespace XamCore.Registrar { public string Typename; public bool IsCustomType; } - - interface IDynamicRegistrar { - void RegisterAssembly (Assembly assembly); - UnmanagedMethodDescription GetMethodDescription (Type type, IntPtr selptr); - UnmanagedMethodDescription GetMethodDescriptionAndObject (Type type, IntPtr sel, IntPtr obj, ref IntPtr mthis); - Type Lookup (IntPtr klass, bool throw_on_error); - IntPtr Register (Type Type); - void Register (Type gype, ref List exceptions); - Dictionary GetRegistrationMap (int initial_capacity); - void SetAssemblyRegistered (string assembly); - Dictionary GetMethods (Type type); - void RegisterMethods (Type type, Dictionary methods); - bool IsCustomType (Type type); - void RegisterMethod (Type type, MethodInfo minfo, ExportAttribute ea); - IEnumerable GetAssemblies (); - string ComputeSignature (MethodInfo minfo, bool isBlockSignature); - } #endif } diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 90d6e73c4d..a290a81054 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -48,8 +48,7 @@ namespace XamCore.ObjCRuntime { internal static IntPtrEqualityComparer IntPtrEqualityComparer; internal static TypeEqualityComparer TypeEqualityComparer; - // note: must stay a field (or the linker must be modified) - internal static IDynamicRegistrar Registrar; + internal static DynamicRegistrar Registrar; internal unsafe struct RegistrationData { public MTRegistrationMap *map;