diff options
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/Connection.cpp')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/Connection.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Connection.cpp b/cpp/bindings/qpid/dotnet/src/Connection.cpp index 9171b5e9fc..d4d5d2fd4f 100644 --- a/cpp/bindings/qpid/dotnet/src/Connection.cpp +++ b/cpp/bindings/qpid/dotnet/src/Connection.cpp @@ -267,6 +267,56 @@ namespace Messaging { }
}
+
+ void Connection::Reconnect(System::String ^ url)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ std::string nativeUrl = QpidMarshal::ToNative(url);
+ nativeObjPtr->reconnect(nativeUrl);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Connection::Reconnect()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->reconnect();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
//
// CreateTransactionalSession()
//
|
