diff options
Diffstat (limited to 'dotnet/Qpid.Client/qms/UrlSyntaxException.cs')
| -rw-r--r-- | dotnet/Qpid.Client/qms/UrlSyntaxException.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dotnet/Qpid.Client/qms/UrlSyntaxException.cs b/dotnet/Qpid.Client/qms/UrlSyntaxException.cs index f7aaf56085..e6da62a829 100644 --- a/dotnet/Qpid.Client/qms/UrlSyntaxException.cs +++ b/dotnet/Qpid.Client/qms/UrlSyntaxException.cs @@ -19,10 +19,12 @@ * */ using System; +using System.Runtime.Serialization; using System.Text; namespace Qpid.Client.qms { + [Serializable] public class UrlSyntaxException : UriFormatException { private string _url; @@ -53,6 +55,22 @@ namespace Qpid.Client.qms _length = length; } + protected UrlSyntaxException(SerializationInfo info, StreamingContext ctxt) + : base(info, ctxt) + { + _url = info.GetString("Url"); + _index = info.GetInt32("Index"); + _length = info.GetInt32("Length"); + } + + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + info.AddValue("Url", _url); + info.AddValue("Index", _index); + info.AddValue("Length", _length); + } + private static String getPositionString(int index, int length) { StringBuilder sb = new StringBuilder(index + 1); |
