Skip to content

Commit

Permalink
change load method (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashuaidehao authored and vncoelho committed Jun 12, 2019
1 parent e497d95 commit 524ab15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/Plugins/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ internal static void LoadPlugins(NeoSystem system)
if (!Directory.Exists(pluginsPath)) return;
foreach (string filename in Directory.EnumerateFiles(pluginsPath, "*.dll", SearchOption.TopDirectoryOnly))
{
Assembly assembly = Assembly.LoadFile(filename);
var file = File.ReadAllBytes(filename);
Assembly assembly = Assembly.Load(file);
foreach (Type type in assembly.ExportedTypes)
{
if (!type.IsSubclassOf(typeof(Plugin))) continue;
Expand Down

0 comments on commit 524ab15

Please sign in to comment.