diff options
author | Stephen D. Huston <shuston@apache.org> | 2011-10-21 14:42:12 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2011-10-21 14:42:12 +0000 |
commit | f83677056891e436bf5ba99e79240df2a44528cd (patch) | |
tree | 625bfd644b948e89105630759cf6decb0435354d /cpp/bindings/qpid/dotnet/src/Receiver.cpp | |
parent | ebfd9ff053b04ab379acfc0fefedee5a31b6d8a5 (diff) | |
download | qpid-python-QPID-2519.tar.gz |
Merged out from trunkQPID-2519
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-2519@1187375 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/Receiver.cpp')
-rw-r--r-- | cpp/bindings/qpid/dotnet/src/Receiver.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Receiver.cpp b/cpp/bindings/qpid/dotnet/src/Receiver.cpp index 3c0d79b393..8aa77effbd 100644 --- a/cpp/bindings/qpid/dotnet/src/Receiver.cpp +++ b/cpp/bindings/qpid/dotnet/src/Receiver.cpp @@ -89,7 +89,7 @@ namespace Messaging { }
- // Copy constructor
+ // Copy constructor look-alike (C#)
Receiver::Receiver(const Receiver ^ receiver) :
parentSession(receiver->parentSession)
{
@@ -112,6 +112,29 @@ namespace Messaging { }
}
+ // Copy constructor implicitly dereferenced (C++)
+ Receiver::Receiver(const Receiver % receiver) :
+ parentSession(receiver.parentSession)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ receiverp = new ::qpid::messaging::Receiver(
+ *(const_cast<Receiver %>(receiver).NativeReceiver));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
//
// Get(message)
|