summaryrefslogtreecommitdiff
path: root/dotnet/Qpid.Client/Client/State
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-01-05 17:00:41 +0000
committerRobert Greig <rgreig@apache.org>2007-01-05 17:00:41 +0000
commitc37fb7c4b27419cae13c45fb38e24506fd009ea4 (patch)
tree4c0a380c17f0406fe95aa2ece26d52759f200800 /dotnet/Qpid.Client/Client/State
parent2d976b546f26b04f41606df6675f3217058d2d6f (diff)
downloadqpid-python-c37fb7c4b27419cae13c45fb38e24506fd009ea4.tar.gz
Qpid-246-2 patch applied. Adds serializability to exceptions missed by the first patch.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@493087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client/Client/State')
-rw-r--r--dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs b/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs
index 723ae04397..86b625951e 100644
--- a/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs
+++ b/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs
@@ -19,9 +19,11 @@
*
*/
using System;
+using System.Runtime.Serialization;
namespace Qpid.Client.State
{
+ [Serializable]
public class IllegalStateTransitionException : AMQException
{
private AMQState _originalState;
@@ -36,6 +38,13 @@ namespace Qpid.Client.State
_frame = frame;
}
+ protected IllegalStateTransitionException(SerializationInfo info, StreamingContext ctxt)
+ : base(info, ctxt)
+ {
+ _originalState = (AMQState)info.GetValue("OriginalState", typeof(AMQState));
+ _frame = (Type)info.GetValue("FrameType", typeof(Type));
+ }
+
public AMQState OriginalState
{
get
@@ -51,6 +60,14 @@ namespace Qpid.Client.State
return _frame;
}
}
+
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ info.AddValue("OriginalState", OriginalState);
+ info.AddValue("FrameType", FrameType);
+ }
}
}
+