public LazyNotification SendSpecialCommand(Ts3Command com, params NotificationType[] dependsOn)
        {
            if (!com.ExpectResponse)
            {
                throw new ArgumentException("A special command must take a response");
            }

            using (var wb = new WaitBlock(dependsOn))
            {
                SendCommandBase(wb, com);
                return(wb.WaitForNotification());
            }
        }
Beispiel #2
0
        public R <LazyNotification, CommandError> SendNotifyCommand(Ts3Command com, params NotificationType[] dependsOn)
        {
            if (!com.ExpectResponse)
            {
                throw new ArgumentException("A special command must take a response");
            }

            using (var wb = new WaitBlock(false, dependsOn))
            {
                var result = SendCommandBase(wb, com);
                if (!result.Ok)
                {
                    return(result.Error);
                }
                return(wb.WaitForNotification());
            }
        }