1
0
mirror of synced 2024-12-03 11:37:21 +01:00
Switch-Toolbox/Switch_Toolbox_Library/Plugin/GenericPluginLoader.cs
2018-11-11 19:48:33 -05:00

27 lines
632 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PluginContracts;
namespace Switch_Toolbox.Library
{
public static class GenericPluginLoader
{
public static Dictionary<string, IPlugin> _Plugins;
public static void LoadPlugin()
{
_Plugins = new Dictionary<string, IPlugin>();
ICollection<IPlugin> plugins = PluginLoader.LoadPlugins();
foreach (var item in plugins)
{
_Plugins.Add(item.Name, item);
}
plugins.Clear();
}
}
}