diff options
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/Address.cpp')
-rw-r--r-- | cpp/bindings/qpid/dotnet/src/Address.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Address.cpp b/cpp/bindings/qpid/dotnet/src/Address.cpp index b688d973ed..79a8021d9a 100644 --- a/cpp/bindings/qpid/dotnet/src/Address.cpp +++ b/cpp/bindings/qpid/dotnet/src/Address.cpp @@ -141,7 +141,7 @@ namespace Messaging { }
}
- // copy constructor
+ // Copy constructor look-alike (C#)
Address::Address(const Address ^ address)
{
System::Exception ^ newException = nullptr;
@@ -163,6 +163,28 @@ namespace Messaging { }
}
+ // Copy constructor implicitly dereferenced (C++)
+ Address::Address(const Address % address)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ addressp = new ::qpid::messaging::Address(
+ *(const_cast<Address %>(address).NativeAddress));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
// unmanaged clone
Address::Address(const ::qpid::messaging::Address & addrp)
{
|