Пример #1
0
 private static string FormatTwitterError(TwitterError error)
 => string.Join(",", error.Errors.Select(x => x.ToString()));
Пример #2
0
 public TwitterApiException(HttpStatusCode statusCode, TwitterError error, string responseText)
     : base(FormatTwitterError(error), responseText)
 {
     this.StatusCode    = statusCode;
     this.ErrorResponse = error;
 }
Пример #3
0
 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));
 }
Пример #4
0
 public TwitterApiException(TwitterError error, string responseText)
     : base(FormatTwitterError(error), responseText)
 {
     this.ErrorResponse = error;
 }