Exemplo n.º 1
0
        /// <summary>
        /// Adds the specified switch to the list of switches supported
        /// by the actuator. switchSetting contains all the attributes of the
        /// switch.  The swtich is added to the actuators settings file and the
        /// file saved.
        /// </summary>
        /// <param name="actuator">Actuator to add to</param>
        /// <param name="switchSetting">Settings for the switch</param>
        /// <returns>true on success, false if actuator not found</returns>
        public bool RegisterSwitch(IActuator actuator, SwitchSetting switchSetting)
        {
            if (_actuators.Find(actuator.GetType()) == null)
            {
                return(false);
            }

            return(_actuators.AddSwitch(actuator, switchSetting));
        }