c# - Type check on runtime loaded assembly -


i'm facing problem using external dlls mono @ runtime. suppose have framework dll containing interface imyinterface, "plugin" project using framework in class implements imyinterface interface. plugin, once deployed dll, loaded framework @ runtime, , classes implements imyinterface must added collection within framework. this, type test must done on types. unfortunately, when types loaded dll, type test fail if imported class implementing known interface. more precisely, following statement

importedtype.gettype().isassignablefrom(typeof(imyinterface)) 

returns false, if type implements imyinterface. suppose imported type system.runtimetype, , not system.type. how can deal issue? may interface imyinterface has different signature across same assembly used different solutions?

isassignablefrom 1 of confusing method

typeof(imyinterface).isassignablefrom(myobject.gettype()) typeof(imyinterface).isassignablefrom(importedtype) 

https://msdn.microsoft.com/en-us/library/system.type.isassignablefrom(v=vs.110).aspx


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -