/// <summary> /// Assigns every property from another instance /// </summary> /// <param name="from">Object to assign from</param> /// <exception cref="ArgumentNullException">other is null</exception> /// <exception cref="ArgumentException">Types do not match</exception> public void Assign(object from) { if (from == null) { throw new ArgumentNullException(); } if (!(from is Channels other)) { throw new ArgumentException("Invalid type"); } HTTP.Assign(other.HTTP); Telnet.Assign(other.Telnet); File.Assign(other.File); USB.Assign(other.USB); AUX.Assign(other.AUX); Daemon.Assign(other.Daemon); CodeQueue.Assign(other.CodeQueue); LCD.Assign(other.LCD); SPI.Assign(other.SPI); AutoPause.Assign(other.AutoPause); }