/// <summary> /// Adds a consumer to the specified video channel with parameters /// </summary> /// <param name="consumer"></param> /// <param name="consumerIndex"></param> /// <param name="parameters"></param> /// <returns></returns> public virtual bool Add(ConsumerType consumer, uint?consumerIndex = null, string parameters = null) { var stringBuilder = new StringBuilder(); stringBuilder.Append($"{AMCPCommand.ADD.ToAmcpValue()} {ID}"); if (consumerIndex != null) { stringBuilder.Append($"-{consumerIndex}"); } stringBuilder.Append($" {consumer.ToAmcpValue()}"); if (!string.IsNullOrEmpty(parameters)) { stringBuilder.Append($" {parameters}"); } return(_amcpTcpParser.SendCommand(stringBuilder.ToString())); }
/// <summary> /// Adds a consumer to the specified video channel. /// </summary> /// <param name="consumerIndex"></param> /// <param name="consumer">overrides the index that the consumer itself decides and can later be </param> /// <returns></returns> public virtual bool Add(ConsumerType consumer, uint consumerIndex) { return(_amcpTcpParser.SendCommand($"{AMCPCommand.ADD.ToAmcpValue()} {ID} {consumer.ToAmcpValue()} {consumerIndex}")); }