Beispiel #1
0
            public static void InvokePlugin()
            {
                var      plugins   = Directory.GetFiles(pathToPlugins, "*.dll");
                var      discovery = new Discover();
                Assembly ass       = null;

                foreach (var plugin in plugins)
                {
                    var plName = discovery.GetPluginsByTypeName(plugin, typeof(IPlugin));
                    foreach (var name in plName)
                    {
                        Console.WriteLine(name);
                        var nameAss = AssemblyName.GetAssemblyName(plugin);
                        nameAss = AssemblyName.GetAssemblyName(plugin);
                        Assembly.Load(nameAss);
                    }
                }
            }