Пример #1
0
        public static void Activate(Type pluginType)
        {
            TSPlugin plugin = Activator.CreateInstance(pluginType) as TSPlugin;

            if (plugin != null)
            {
                plugins[plugin.PropertyName] = pluginType;
            }
        }
Пример #2
0
 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;
     }
 }