public void SetAnswer(ErrorStatus error) { if (error == null) { throw new ArgumentNullException(nameof(error)); } errorStatus = error; waiter.Set(); }
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); }
internal QueryCommandException(ErrorStatus message, Exception inner) : base(message.ErrorFormat(), inner) { ErrorStatus = message; }
internal QueryCommandException(ErrorStatus message) : base(message.ErrorFormat()) { ErrorStatus = message; }
public void SetAnswer(ErrorStatus error, IEnumerable <IResponse> answer) { this.answer = answer; SetAnswer(error); }