You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2011/04/26 22:38:07 UTC
svn commit: r1096898 -
/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h
Author: chug
Date: Tue Apr 26 20:38:06 2011
New Revision: 1096898
URL: http://svn.apache.org/viewvc?rev=1096898&view=rev
Log:
QPID-3226 Define more intuitive equality operators for Duration instances
Add == and != operators for Duration class.
Modified:
qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h
Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h?rev=1096898&r1=1096897&r2=1096898&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h Tue Apr 26 20:38:06 2011
@@ -81,7 +81,17 @@ namespace Messaging {
Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
return result;
}
- };
+
+ static bool operator == (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds == b->Milliseconds;
+ }
+
+ static bool operator != (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds != b->Milliseconds;
+ }
+};
public ref class DurationConstants sealed
{
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org