Allow loading more than one plugin per assembly

This commit is contained in:
Latif Khalifa
2013-12-05 00:16:58 +01:00
parent c280c357e7
commit 43b8c6b54b

View File

@@ -123,6 +123,7 @@ namespace GridProxyGUI
try
{
bool started = false;
Assembly assembly = Assembly.LoadFile(System.IO.Path.GetFullPath(path));
foreach (Type t in assembly.GetTypes())
{
@@ -131,9 +132,11 @@ namespace GridProxyGUI
ConstructorInfo info = t.GetConstructor(new Type[] { typeof(ProxyFrame) });
ProxyPlugin plugin = (ProxyPlugin)info.Invoke(new object[] { proxy });
plugin.Init();
return true;
started = true;
}
}
return started;
}
catch (Exception e)
{