Example #1
0
        static public string Load(string plugin_folder)
        {
            if (!Domains.TryGetValue(plugin_folder, out PluginDomain domain))
            {
                domain = new PluginDomain(plugin_folder);
                Domains.TryAdd(plugin_folder, domain);
            }

            domain.Load(typeof(Plugin));
            return(domain.ClassNames);
        }
Example #2
0
        public PluginManager(string plugin_folder)
        {
            if (Domains.TryGetValue(plugin_folder, out PluginDomain domain))
            {
                Domain = domain;
            }
            else
            {
                Domain = new PluginDomain(plugin_folder);
                Domains.TryAdd(plugin_folder, Domain);
            }

            Domain.Unloaded += DomainUnloaded;
        }