private static void OnP2Created(object sender, FileSystemEventArgs e) { var p = new TestPlugin(); p.ConfigurePlugin("test", "p1Handler", "NotifyCaller", @"C:\Python\Plugin\p2Handler.py"); string[] parameters = { e.FullPath }; updateText += p.ExecutePlugin <string>(parameters); updateText += "\r\n"; }
static void Main(string[] args) { var t = new TestPlugin(); t.ConfigurePlugin("test", "pluginTest", "HelloPlugin", @"C:\Python\Plugin\pluginTest.py"); Console.WriteLine(t.ExecutePlugin <string>()); var p = new TestPlugin(); p.ConfigurePlugin("params", "pluginParameters", "tryParams", @"C:\Python\Plugin\pluginParameters.py"); string[] parameters = { "Alan", "24" }; Console.WriteLine(p.ExecutePlugin <string>(parameters)); var e = new EngineManager(); e.Initialize(@"C:\Python\Plugin\pluginTest.py"); Console.WriteLine(e.Execute <string>("pluginTest", "HelloPlugin")); Console.Read(); }