Esempio n. 1
0
 private void RestartFirst(object state)
 {
     // here we talk with a host and request list of all plugins
     foreach (var plugin in _host.Plugins)
     {
         Console.WriteLine("Found plugin " + plugin);
     }
     if (_iteration % 2 == 0)
     {
         Console.WriteLine("Trying to start first plugin");
         // start another plugin from inside this one
         _host.StartPlugin("Plugin1");
     }
     else
     {
         Console.WriteLine("Trying to stop first plugin");
         // stop another plugin from inside this one
         _host.StopPlugin("Plugin1");
     }
     _iteration++;
 }