public DriverSubSystem(IDriverLoader driverLoader)
        {
            _driverLoader = driverLoader;

            _driverInfos     = new ConcurrentList <DriverInfo>();
            _driverInstances = new ConcurrentList <DriverInstance>();
        }
Пример #2
0
 public PluginHandler(ILogger <PluginHandler> logger, AutomaticaContext dbContext, IDriverLoader driverLoader, ILogicLoader logicLoader, INodeTemplateCache nodeTemplateCache, IConfiguration config, IPluginInstaller pluginInstaller)
 {
     _logger            = logger;
     _dbContext         = dbContext;
     _driverLoader      = driverLoader;
     _logicLoader       = logicLoader;
     _nodeTemplateCache = nodeTemplateCache;
     _config            = config;
     _pluginInstaller   = pluginInstaller;
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Driver"/> class.
        /// </summary>
        /// <param name="DriverConfig">The driver configuration.</param>
        /// <param name="DriverLoader">The driver loader.</param>
        /// <param name="DriverIo">The driver IO requests handler.</param>
        public Driver(DriverConfig DriverConfig, IDriverLoader DriverLoader, IDriverIo DriverIo)
        {
            if (DriverConfig == null)
            {
                throw new ArgumentNullException(nameof(DriverConfig));
            }

            if (DriverLoader == null)
            {
                throw new ArgumentNullException(nameof(DriverLoader));
            }

            if (DriverIo == null)
            {
                throw new ArgumentNullException(nameof(DriverIo));
            }

            this.Setup(DriverConfig, DriverLoader, DriverIo);
        }
Пример #4
0
        /// <summary>
        /// Setups the driver.
        /// </summary>
        /// <param name="DriverConfig">The driver configuration.</param>
        /// <param name="DriverLoader">The driver loader.</param>
        /// <param name="DriverIo">The driver IO requests handler.</param>
        public void Setup(DriverConfig DriverConfig, IDriverLoader DriverLoader, IDriverIo DriverIo)
        {
            if (DriverConfig == null)
            {
                throw new ArgumentNullException(nameof(DriverConfig));
            }

            if (DriverLoader == null)
            {
                throw new ArgumentNullException(nameof(DriverLoader));
            }

            if (DriverIo == null)
            {
                throw new ArgumentNullException(nameof(DriverIo));
            }

            this.Config = DriverConfig;
            this.Loader = DriverLoader;
            this.IO     = DriverIo;
        }