public static void Activate(Type pluginType) { TSPlugin plugin = Activator.CreateInstance(pluginType) as TSPlugin; if (plugin != null) { plugins[plugin.PropertyName] = pluginType; } }
public static void Init() { if (plugins == null) { plugins = new Dictionary <string, Type>(); foreach (Type pluginType in pluginList) { TSPlugin plugin = Activator.CreateInstance(pluginType) as TSPlugin; plugins[plugin.PropertyName] = pluginType; } pluginList = null; } }