コード例 #1
0
        public DriverSubSystem(IDriverLoader driverLoader)
        {
            _driverLoader = driverLoader;

            _driverInfos     = new ConcurrentList <DriverInfo>();
            _driverInstances = new ConcurrentList <DriverInstance>();
        }
コード例 #2
0
ファイル: PluginHandler.cs プロジェクト: vsssunder/automatica
 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;
        }