/// <summary> /// Get errors (ARB Support) /// </summary> /// <param name="response"></param> private static string GetErrors(ANetApiResponseType response) { StringBuilder sb = new StringBuilder(); sb.AppendLine("The API request failed with the following errors:"); for (int i = 0; i < response.messages.Length; i++) { sb.AppendLine("[" + response.messages[i].code + "] " + response.messages[i].text); } return(sb.ToString()); }
/// <summary> /// Get errors (ARB Support) /// </summary> /// <param name="response"></param> private static string GetErrors(ANetApiResponseType response) { var sb = new StringBuilder(); sb.AppendLine("The API request failed with the following errors:"); foreach (var message in response.messages) { sb.AppendLine("[" + message.code + "] " + message.text); } return(sb.ToString()); }
private string GetSubscriptionErrors(ANetApiResponseType response) { StringBuilder sb = new StringBuilder(); sb.AppendLine("The API request failed with the following errors:"); for (int i = 0; i < response.messages.Length; i++) { sb.AppendFormat("[{0}] {1}\r\n", response.messages[i].code, response.messages[i].text); } return(sb.ToString()); }
/// <summary> /// Get errors (ARB Support) /// </summary> /// <param name="response"></param> private static string GetErrors(ANetApiResponseType response) { StringBuilder sb = new StringBuilder(); sb.AppendLine("The API request failed with the following errors:"); for (int i = 0; i < response.messages.Length; i++) { sb.AppendLine("[" + response.messages[i].code + "] " + response.messages[i].text); } return sb.ToString(); }