Beispiel #1
0
        /// <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.");
        }
Beispiel #2
0
 /// <inheritdoc/>
 public AMCPError SendCommandAndGetStatus(AMCPCommand command)
 {
     return(SendCommandAndGetStatus(command.ToAmcpValue()));
 }
Beispiel #3
0
 /// <inheritdoc/>
 public AMCPEventArgs SendCommandAndGetResponse(AMCPCommand command, TimeSpan?timeout = null)
 {
     return(SendCommandAndGetResponse(command.ToAmcpValue(), timeout.GetValueOrDefault(TimeSpan.FromSeconds(DefaultTimeoutInSecond))));
 }
Beispiel #4
0
 /// <inheritdoc/>
 public bool SendCommand(AMCPCommand command)
 {
     return(SendCommandAndGetStatus(command) == AMCPError.None);
 }