private static string FormatTwitterError(TwitterError error)
 => string.Join(",", error.Errors.Select(x => x.ToString()));
 public TwitterApiException(HttpStatusCode statusCode, TwitterError error, string responseText)
     : base(FormatTwitterError(error), responseText)
 {
     this.StatusCode    = statusCode;
     this.ErrorResponse = error;
 }
 protected TwitterApiException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.StatusCode    = (HttpStatusCode)info.GetValue("StatusCode", typeof(HttpStatusCode));
     this.ErrorResponse = (TwitterError)info.GetValue("ErrorResponse", typeof(TwitterError));
 }
Exemple #4
0
 public TwitterApiException(TwitterError error, string responseText)
     : base(FormatTwitterError(error), responseText)
 {
     this.ErrorResponse = error;
 }