Hello,
just noticed a few bugs on the way plugins are loaded.
If you put a non .NET dll in the plugins folder, it stops the scan when it reaches the dll.
Had a look on the hoster code in subversion (Method Scan for plugins), as you might use the same technique in the main vvvv application.
{CODE(ln=>1)}plugindll = System.Reflection.Assembly.LoadFrom(dllsi);^
That should be inside the try catch , as if one dll fails to load as an assembly, it will break the loop and other assemblies won’t be loaded
{CODE(ln=>1)}if (objType.IsPublic)^
If possible it should be replaced by
{CODE(ln=>1)}if (objType.IsPublic && !objType.IsAbstract)^
So we only list concrete classes.
{CODE(ln=>1)}objInterface = objType.GetInterface(“VVVV.PluginInterfaces.V1.IPlugin”);
if (objInterface != null)
This one is not a problem, but a normally type safe way to do it is:
{CODE(ln=>1)}if (typeof(IPlugin).IsAssignableFrom(objType.GetType())
thanks
vux