/// <inheritdoc/> public void SendCommandAndCheckError(AMCPCommand command) { var error = SendCommandAndGetStatus(command); if (error == AMCPError.None) { return; } throw new InvalidOperationException($"An error {error.ToString()} occured when sending the command to the server."); }
/// <inheritdoc/> public AMCPError SendCommandAndGetStatus(AMCPCommand command) { return(SendCommandAndGetStatus(command.ToAmcpValue())); }
/// <inheritdoc/> public AMCPEventArgs SendCommandAndGetResponse(AMCPCommand command, TimeSpan?timeout = null) { return(SendCommandAndGetResponse(command.ToAmcpValue(), timeout.GetValueOrDefault(TimeSpan.FromSeconds(DefaultTimeoutInSecond)))); }
/// <inheritdoc/> public bool SendCommand(AMCPCommand command) { return(SendCommandAndGetStatus(command) == AMCPError.None); }