diff options
| author | Charles E. Rolke <chug@apache.org> | 2011-06-17 21:23:50 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2011-06-17 21:23:50 +0000 |
| commit | 7b1e12a3e3d6d4b0f7cd42e413bfa9b038f6a02e (patch) | |
| tree | 6eba224374f39a84e7dafaa91042f5c5bdc97171 /cpp/bindings | |
| parent | 607d6f916f0c4b1d3fa0c739c374527367c9b400 (diff) | |
| download | qpid-python-7b1e12a3e3d6d4b0f7cd42e413bfa9b038f6a02e.tar.gz | |
QPID-3200 Ability to acknowledge all messages up to and including a given message for a Session
.NET Binding keeps up with additions to the Messaging package.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1137034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/Session.cpp | 25 | ||||
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/Session.h | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Session.cpp b/cpp/bindings/qpid/dotnet/src/Session.cpp index 4a6199f108..0e918769a3 100644 --- a/cpp/bindings/qpid/dotnet/src/Session.cpp +++ b/cpp/bindings/qpid/dotnet/src/Session.cpp @@ -248,6 +248,31 @@ namespace Messaging { }
}
+ void Session::AcknowledgeUpTo(Message ^ message)
+ {
+ AcknowledgeUpTo(message, false);
+ }
+
+ void Session::AcknowledgeUpTo(Message ^ message, bool sync)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ sessionp->acknowledgeUpTo(*(message->NativeMessage), sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
void Session::Reject(Message ^ message)
{
System::Exception ^ newException = nullptr;
diff --git a/cpp/bindings/qpid/dotnet/src/Session.h b/cpp/bindings/qpid/dotnet/src/Session.h index 4d4cad75c4..4b98a37f18 100644 --- a/cpp/bindings/qpid/dotnet/src/Session.h +++ b/cpp/bindings/qpid/dotnet/src/Session.h @@ -104,6 +104,8 @@ namespace Messaging { void Acknowledge(bool sync);
void Acknowledge(Message ^ message);
void Acknowledge(Message ^ message, bool sync);
+ void AcknowledgeUpTo(Message ^ message);
+ void AcknowledgeUpTo(Message ^ message, bool sync);
void Reject(Message ^);
void Release(Message ^);
void Sync();
|
