diff options
Diffstat (limited to 'dotnet/Qpid.Messaging/ChannelLimitReachedException.cs')
-rw-r--r-- | dotnet/Qpid.Messaging/ChannelLimitReachedException.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs b/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs index 645c0d0cdd..0cfd2f24bc 100644 --- a/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs +++ b/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs @@ -18,8 +18,13 @@ * under the License. * */ + +using System; +using System.Runtime.Serialization; + namespace Qpid.Messaging { + [Serializable] public class ChannelLimitReachedException : ResourceAllocationException { private long _limit; @@ -32,6 +37,12 @@ namespace Qpid.Messaging _limit = limit; } + protected ChannelLimitReachedException(SerializationInfo info, StreamingContext ctxt) + : base(info, ctxt) + { + _limit = info.GetInt64("Limit"); + } + public long Limit { get @@ -39,5 +50,11 @@ namespace Qpid.Messaging return _limit; } } + + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + info.AddValue("Limit", _limit); + } } } |