public void AddDriver(InputDriver driver) { if (_driversList.Contains(driver)) { throw new ArgumentException(driver.Name + " is already present."); } driver.InputReceived += InputHandler; _driversList.Add(driver); }
public void RemoveDriver(InputDriver driver) { try { driver.InputReceived -= InputHandler; _driversList.Remove(driver); } catch { throw new ArgumentException(driver.Name + " driver is not present."); } }