private static bool TryResolvePluginInterface(PluginInterfaceImplementation description, out Type interfaceType) { try { // GetType(..., false) does not cut it because that STILL throws exceptions, yay! interfaceType = ResolvePluginInterface(description); return(interfaceType != null); } catch (Exception e) { Log.DebugFormat("Caught exception while trying to resolve interface '{0}':\r\n{1}", description.InterfaceTypename, e); interfaceType = null; return(false); } }
private static Type ResolvePluginInterface(PluginInterfaceImplementation description) { return(typeof(IPlugin).Assembly.GetType(description.InterfaceTypename)); }