public PluginControlCommand(IPluginsManager pluginMan, IEventBus eventBus, ILogger <PluginControlCommand> logger, IReadOnlyPluginOptions <MyPluginConfiguration> options)
 {
     _pluginMan = pluginMan;
     _eventBus  = eventBus;
     _logger    = logger;
     _options   = options;
 }
示例#2
0
        public NeonManager()
        {
            ConfigureLogger(null);
            PrintHeader();
            _logger = Log.Logger.ForContext <NeonManager>();
            _logger.Debug($"Pre-loading assemblies");
            var assemblies = AssemblyUtils.GetAppAssemblies();

            _logger.Debug($"Loaded {assemblies.Count} assemblies");

            AvailableServices    = new List <Type>();
            IsRunningInDocker    = Environment.GetEnvironmentVariables()["DOTNET_RUNNING_IN_CONTAINER"] != null;
            _oAuthReceiverData   = new List <OAuthReceiverData>();
            _webHookReceiverData = new List <WebHookReceiverData>();
            _containerBuilder    = new ContainerBuilder();
            _containerBuilder.RegisterBuildCallback(container => { _logger.Debug($"Container is ready"); });

            _configManager = new ConfigManager(_logger, this, _containerBuilder);
            _configManager.LoadConfig();

            _secretKeyManager = new SecretKeyManager(Config.EngineConfig.SecretKey);

            _fileSystemManager = new FileSystemManager(_logger, Config, _secretKeyManager);
            _fileSystemManager.Start();

            ConfigureLogger(_configManager);

            _pluginsManager = new PluginsManager(_logger, _fileSystemManager, Config);
            _pluginsManager.Start();
        }
示例#3
0
 public MyCommandComponent(
     ILogger <MyCommandComponent> logger,
     IPluginsManager pluginsManager,
     IPluginOptions <MyPlugin, MyPluginConfiguration> config,
     IFormatter formatter,
     IDataSource dataSource)
 {
     Logger         = logger;
     PluginsManager = pluginsManager;
     Config         = config;
     Formatter      = formatter;
     DataSource     = dataSource;
 }
示例#4
0
        public ProjectLoader(IFileLoader fileLoader,
                             ILibraryLoader libraryLoader, IPluginsManager pluginsMgr,
                             IConfiguration conf, ILoaderExtension ext,
                             ILogger logger)
        {
            m_FileLoader     = fileLoader;
            m_LibraryLoader  = libraryLoader;
            m_Config         = conf;
            m_PluginsManager = pluginsMgr;

            m_Ext    = ext;
            m_Logger = logger;

            m_Filter = GetFilesFilter();
        }
示例#5
0
 public Model(
     ISynchronizationContext threadSync,
     IChangeNotification changeNotification,
     Persistence.IWebContentCache webCache,
     Persistence.IContentCache contentCache,
     Persistence.IStorageManager storageManager,
     IBookmarks bookmarks,
     ILogSourcesManager sourcesManager,
     IModelThreads threads,
     ITempFilesManager tempFilesManager,
     Preprocessing.IModel preprocessingModel,
     Progress.IProgressAggregator progressAggregator,
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     MRU.IRecentlyUsedEntities mru,
     Progress.IProgressAggregatorFactory progressAggregatorsFactory,
     IShutdown shutdown,
     WebViewTools.IWebViewTools webViewTools,
     Postprocessing.IModel postprocessingModel,
     IPluginsManager pluginsManager,
     ITraceSourceFactory traceSourceFactory,
     LogMedia.IFileSystem fileSystem
     )
 {
     this.SynchronizationContext = threadSync;
     this.ChangeNotification     = changeNotification;
     this.WebContentCache        = webCache;
     this.ContentCache           = contentCache;
     this.StorageManager         = storageManager;
     this.Bookmarks                  = bookmarks;
     this.SourcesManager             = sourcesManager;
     this.Threads                    = threads;
     this.TempFilesManager           = tempFilesManager;
     this.Preprocessing              = preprocessingModel;
     this.ProgressAggregator         = progressAggregator;
     this.LogProviderFactoryRegistry = logProviderFactoryRegistry;
     this.UserDefinedFormatsManager  = userDefinedFormatsManager;
     this.ProgressAggregatorsFactory = progressAggregatorsFactory;
     this.MRU                = mru;
     this.Shutdown           = shutdown;
     this.WebViewTools       = webViewTools;
     this.Postprocessing     = postprocessingModel;
     this.PluginsManager     = pluginsManager;
     this.TraceSourceFactory = traceSourceFactory;
     this.FileSystem         = fileSystem;
 }
 public PluginManagerViewModel(IPluginsManager pluginsManager, IWindowManager windowManager)
 {
     WindowManager  = windowManager;
     PluginsManager = pluginsManager;
     InitializePlugins();
     _onPluginLoad = PluginsManager.OnPluginLoad((descriptor) =>
     {
         AddPlugin(descriptor);
         WindowManager.BeginUIThreadScope(() => OnPropertyChanged(new PropertyChangedEventArgs(descriptor.ToString())));
     });
     _onPluginUnload = PluginsManager.OnPluginUnload((descriptor) =>
     {
         WindowManager.BeginUIThreadScope(() => OnPropertyChanged(new PropertyChangedEventArgs(descriptor.ToString())));
     });
     _onPluginInitialized = PluginsManager.OnPluginInitialized((descriptor) =>
     {
         WindowManager.BeginUIThreadScope(() => OnPropertyChanged(new PropertyChangedEventArgs(descriptor.ToString())));
     });
 }
示例#7
0
        static void Main(string[] args)
        {
            //Unity dependency injection
            var container = new UnityContainer();

            container.RegisterType <IPaths, DefaultPaths>();
            container.RegisterType <IScriptReader, XmlScriptReader>();
            container.RegisterType <IPluginsManager, PluginsManager>(new ContainerControlledLifetimeManager());

            IPaths          paths          = container.Resolve <IPaths>();
            IScriptReader   reader         = container.Resolve <IScriptReader>();
            IPluginsManager pluginsManager = container.Resolve <IPluginsManager>();
            Sequencer       sequencer      = container.Resolve <Sequencer>();

            // ---------------------------------------------

            try
            {
                Console.WriteLine("\n ---------- READING SEQUENCE FILE -------- ");
                Script script = reader.LoadFromFile(paths.ScriptsFolder + "sequence1.xml");
                Console.WriteLine(script.ToString());

                Console.WriteLine("\n ------------ LOADING PLUGINS ---------- ");
                pluginsManager.LoadPlugins(script.GetUniqueListOfCommands());


                Console.WriteLine("\n ------------ EXECUTING SEQUENCE --------- ");
                sequencer.Execute(script);
            }
            catch (Exception ex)
            {
                Console.WriteLine("\nEXCEPTION: " + ex.Message);
            }

            Console.WriteLine("\nPress any key to exit");
            Console.ReadKey();
        }
 public GameManager(IPluginsManager <IGamePlugin> gamePluginManager, IConfigurationRepository configurationRepository)
 {
     _gamePluginManager       = gamePluginManager;
     _configurationRepository = configurationRepository;
 }
示例#9
0
 public Sequencer(IPluginsManager pluginsManager)
 {
     this.pluginsManager = pluginsManager;
 }
示例#10
0
 public ConfigurationPresenter(IPluginsManager <IGamePlugin> gamePluginsManager, IPluginsManager <IClusterFactoryPlugin> clusterFactoryPluginsManager, IConfigurationRepository configurationRepository)
 {
     _gamePluginsManager           = gamePluginsManager;
     _clusterFactoryPluginsManager = clusterFactoryPluginsManager;
     _configurationRepository      = configurationRepository;
 }
示例#11
0
 public ShapeDrawingForm(IShapesListManager shapesListManager, IPluginsManager pluginsManager)
 {
     this.shapesListManager = shapesListManager;
     this.pluginsManager    = pluginsManager;
     InitializeComponent();
 }
示例#12
0
 public DeviceManager(IPluginsManager <IClusterFactoryPlugin> clusterFactoryPluginManager, IConfigurationRepository configurationRepository, IUserNotifier userNotifier)
 {
     _clusterFactoryPluginManager = clusterFactoryPluginManager;
     _configurationRepository     = configurationRepository;
     _userNotifier = userNotifier;
 }
示例#13
0
 public PluginLoader(IPluginsManager pluginsManager)
 {
     PluginsManager = pluginsManager;
 }