public WebApiException() : base() { }
public WebApiException(string message) : base(message) { }
public WebApiException(string message, Exception innerException) : base(message, innerException) { }
- protected WebApiException(SerializationInfo info, StreamingContext context) : base(info, context) { }
public WebApiException(string message, string responseText)
: this(message)
{
this.ResponseText = responseText;
}
+
+ protected WebApiException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ this.ResponseText = info.GetString("ResponseText");
+ }
+
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ info.AddValue("ResponseText", this.ResponseText);
+ }
}
}