Skip to content

Commit 9ce0661

Browse files
committed
feat: remove obsolete ISerializable support from TonClientException
1 parent 2a50604 commit 9ce0661

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

TonLibDotNet/TonClientException.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
using System.Runtime.Serialization;
2-
using TonLibDotNet.Types;
3-
using TonLibDotNet.Utils;
1+
using TonLibDotNet.Types;
42

53
namespace TonLibDotNet
64
{
7-
[Serializable]
85
public class TonClientException : Exception
96
{
107
public TonClientException(int code, string message)
@@ -19,27 +16,8 @@ public TonClientException(int code, string message, Exception? innerException)
1916
Code = code;
2017
}
2118

22-
protected TonClientException(SerializationInfo info, StreamingContext context)
23-
: base(info, context)
24-
{
25-
Code = info.GetInt32(nameof(Code));
26-
27-
var actualAnswerJson = info.GetString(nameof(ActualAnswer));
28-
if (!string.IsNullOrEmpty(actualAnswerJson))
29-
{
30-
ActualAnswer = new TonJsonSerializer().Deserialize(actualAnswerJson);
31-
}
32-
}
33-
3419
public int Code { get; set; }
3520

3621
public TypeBase? ActualAnswer { get; set; }
37-
38-
public override void GetObjectData(SerializationInfo info, StreamingContext context)
39-
{
40-
base.GetObjectData(info, context);
41-
info.AddValue(nameof(Code), Code);
42-
info.AddValue(nameof(ActualAnswer), ActualAnswer == null ? string.Empty : new TonJsonSerializer().Serialize(ActualAnswer));
43-
}
4422
}
4523
}

0 commit comments

Comments
 (0)