• R/O
  • HTTP
  • SSH
  • HTTPS

open-tween: 提交

開発に使用するリポジトリ


Commit MetaInfo

修订版26d32919fdc5d5a24404223f26ead7ce87a660bb (tree)
时间2014-07-21 15:27:20
作者Kimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

WebApiExceptionをシリアライズに対応できるように修正 (CA2240)

http://msdn.microsoft.com/ja-jp/library/ms182342.aspx

更改概述

差异

--- a/OpenTween/WebApiException.cs
+++ b/OpenTween/WebApiException.cs
@@ -38,7 +38,6 @@ namespace OpenTween
3838 public WebApiException() : base() { }
3939 public WebApiException(string message) : base(message) { }
4040 public WebApiException(string message, Exception innerException) : base(message, innerException) { }
41- protected WebApiException(SerializationInfo info, StreamingContext context) : base(info, context) { }
4241
4342 public WebApiException(string message, string responseText)
4443 : this(message)
@@ -51,5 +50,17 @@ namespace OpenTween
5150 {
5251 this.ResponseText = responseText;
5352 }
53+
54+ protected WebApiException(SerializationInfo info, StreamingContext context)
55+ : base(info, context)
56+ {
57+ this.ResponseText = info.GetString("ResponseText");
58+ }
59+
60+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
61+ {
62+ base.GetObjectData(info, context);
63+ info.AddValue("ResponseText", this.ResponseText);
64+ }
5465 }
5566 }
Show on old repository browser