Exemple #1
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);
        }
Exemple #2
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;
        }