Пример #1
0
 public Program([ImportMany] IConsolePlugin[] consolePlugins)
 {
     _events = new Application.ConsoleEvents();
     _app = new Application(consolePlugins, _events);
     _events.Application = _app;
     foreach(var plugin in consolePlugins)
         plugin.Init(_app);
     _app.NotificationReceived += OnNotificationReceived;
     _app.ExtensionNotificationReceived += OnExtensionNotificationReceived;
 }
Пример #2
0
 public Program([ImportMany] IConsolePlugin[] consolePlugins)
 {
     _events             = new Application.ConsoleEvents();
     _app                = new Application(consolePlugins, _events);
     _events.Application = _app;
     foreach (var plugin in consolePlugins)
     {
         plugin.Init(_app);
     }
     _app.NotificationReceived          += OnNotificationReceived;
     _app.ExtensionNotificationReceived += OnExtensionNotificationReceived;
 }