Example #1
0
 public void SetAnswer(ErrorStatus error)
 {
     if (error == null)
     {
         throw new ArgumentNullException(nameof(error));
     }
     errorStatus = error;
     waiter.Set();
 }
Example #2
0
        private static ErrorStatus GenerateErrorStatus(string line)
        {
            var kvpList     = ParseKeyValueLine(line, true);
            var errorStatus = new ErrorStatus();

            foreach (var responseParam in kvpList)
            {
                switch (responseParam.Key.ToUpperInvariant())
                {
                case "ID": errorStatus.Id = int.Parse(responseParam.Value); break;

                case "MSG": errorStatus.Message = TS3QueryTools.Unescape(responseParam.Value); break;

                case "FAILED_PERMID": errorStatus.MissingPermissionId = int.Parse(responseParam.Value); break;
                }
            }
            return(errorStatus);
        }
Example #3
0
 internal QueryCommandException(ErrorStatus message, Exception inner) : base(message.ErrorFormat(), inner)
 {
     ErrorStatus = message;
 }
Example #4
0
 internal QueryCommandException(ErrorStatus message) : base(message.ErrorFormat())
 {
     ErrorStatus = message;
 }
Example #5
0
 public void SetAnswer(ErrorStatus error, IEnumerable <IResponse> answer)
 {
     this.answer = answer;
     SetAnswer(error);
 }