Author: jgomes
Date: Tue Feb 9 20:39:00 2010
New Revision: 908207
URL: http://svn.apache.org/viewvc?rev=908207&view=rev
Log:
Refactor serialization support of NMS exceptions for .NET Compact Framework.
Fixes [AMQNET-210]. (See https://issues.apache.org/activemq/browse/AMQNET-210)
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IllegalStateException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the IllegalStateException
class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected IllegalStateException(SerializationInfo info,
StreamingContext context)
+ protected
IllegalStateException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidClientIDException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the InvalidClientIDException
class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected InvalidClientIDException(SerializationInfo info,
StreamingContext context)
+ protected
InvalidClientIDException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs
Tue Feb 9 20:39:00 2010
@@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +51,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
InvalidDestinationException class with serialized data.
@@ -59,11 +60,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected InvalidDestinationException(SerializationInfo info,
StreamingContext context)
+ protected
InvalidDestinationException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidSelectorException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the InvalidSelectorException
class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected InvalidSelectorException(SerializationInfo info,
StreamingContext context)
+ protected
InvalidSelectorException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageEOFException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the MessageEOFException class
with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected MessageEOFException(SerializationInfo info,
StreamingContext context)
+ protected
MessageEOFException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageFormatException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the MessageFormatException
class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected MessageFormatException(SerializationInfo info,
StreamingContext context)
+ protected
MessageFormatException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotReadableException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
MessageNotReadableException class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected MessageNotReadableException(SerializationInfo info,
StreamingContext context)
+ protected
MessageNotReadableException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/MessageNotWriteableException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
MessageNotWriteableException class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected MessageNotWriteableException(SerializationInfo info,
StreamingContext context)
+ protected
MessageNotWriteableException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionException.cs
Tue Feb 9 20:39:00 2010
@@ -16,7 +16,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -52,6 +51,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the NMSConnectionException
class with serialized data.
@@ -60,11 +60,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected NMSConnectionException(SerializationInfo info,
StreamingContext context)
+ protected
NMSConnectionException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs
Tue Feb 9 20:39:00 2010
@@ -16,7 +16,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -56,6 +55,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the NMSException class with
serialized data.
@@ -64,26 +64,24 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected NMSException(SerializationInfo info, StreamingContext
context)
+ protected
NMSException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
exceptionErrorCode =
info.GetString("NMSException.exceptionErrorCode");
}
/// <summary>
- /// When overridden in a derived class, sets the
SerializationInfo
- /// with information about the exception.
+ /// When overridden in a derived class, sets the
SerializationInfo with information about the exception.
/// </summary>
- /// <param name="info">The
System.Runtime.Serialization.SerializationInfo that holds the serialized
- /// object data about the exception being thrown.</param>
- /// <param name="context">The StreamingContext that contains
contextual information about the source
- /// or destination.</param>
- public override void GetObjectData(SerializationInfo info,
StreamingContext context)
+ /// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
+ /// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
+ public override void
GetObjectData(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("NMSException.exceptionErrorCode",
exceptionErrorCode);
}
+#endif
#endregion
/// <summary>
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs
Tue Feb 9 20:39:00 2010
@@ -16,7 +16,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -52,6 +51,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the NMSSecurityException
class with serialized data.
@@ -60,11 +60,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected NMSSecurityException(SerializationInfo info,
StreamingContext context)
+ protected
NMSSecurityException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ResourceAllocationException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
ResourceAllocationException class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected ResourceAllocationException(SerializationInfo info,
StreamingContext context)
+ protected
ResourceAllocationException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionInProgressException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
TransactionInProgressException class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected TransactionInProgressException(SerializationInfo
info, StreamingContext context)
+ protected
TransactionInProgressException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs?rev=908207&r1=908206&r2=908207&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/TransactionRolledBackException.cs
Tue Feb 9 20:39:00 2010
@@ -18,7 +18,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace Apache.NMS
{
@@ -51,6 +50,7 @@
}
#region ISerializable interface implementation
+#if !NETCF
/// <summary>
/// Initializes a new instance of the
TransactionRolledBackException class with serialized data.
@@ -59,11 +59,12 @@
/// </summary>
/// <param name="info">The SerializationInfo that holds the
serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains
contextual information about the source or destination.</param>
- protected TransactionRolledBackException(SerializationInfo
info, StreamingContext context)
+ protected
TransactionRolledBackException(System.Runtime.Serialization.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
+#endif
#endregion
}
}