예제 #1
0
        public Server(Config config)
        {
            m_config = config;

            if (m_config.Server.CommandPoint.Port == m_config.Server.DataPort.Port)
            {
                throw new ArgumentException("Server Command and Data ports cannot be the same", nameof(config));
            }

            if (m_config.Forward.HasValue && m_config.Forward.Value.CommandPoint.Port == m_config.Forward.Value.DataPort.Port)
            {
                throw new ArgumentException("Forward Command and Data ports cannot be the same", nameof(config));
            }

            m_driverHandler = new DriverHandler();
            m_driverDB      = new DriverDB(m_driverHandler);
        }
예제 #2
0
 internal DriverDB(DriverHandler handler)
 {
     m_handler = handler;
 }