You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2010/06/09 13:59:39 UTC

svn commit: r952968 [1/2] - in /qpid/trunk/qpid/cpp/bindings/qpid/dotnet: examples/csharp.direct.receiver/ examples/csharp.direct.sender/ examples/csharp.map.callback.receiver/ examples/csharp.map.callback.sender/ examples/csharp.map.receiver/ examples...

Author: tross
Date: Wed Jun  9 11:59:38 2010
New Revision: 952968

URL: http://svn.apache.org/viewvc?rev=952968&view=rev
Log:
QPID-2589 Cleanup pass to address function naming, capitalization rules, change Qpid messaging 'list' representation from List<> to Collection<>,
some exception cleanup.
Patch from Chuck Rolke

Modified:
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs Wed Jun  9 11:59:38 2010
@@ -23,7 +23,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
 
 namespace CSharpDirect
 {
@@ -54,20 +54,20 @@ namespace CSharpDirect
 
             Connection conn = new Connection(host);
 
-            conn.open();
+            conn.Open();
 
-            if (!conn.isOpen())
+            if (!conn.IsOpen())
             {
                 Console.WriteLine("Failed to open connection to host : {0}", host);
             }
             else
             {
 
-                Session sess = conn.createSession();
+                Session sess = conn.CreateSession();
 
                 Duration dura = new Duration(3600000); // wait forever
 
-                Receiver rcv = sess.createReceiver(addr);
+                Receiver rcv = sess.CreateReceiver(addr);
 
                 Message msg = new Message("");
 
@@ -75,8 +75,8 @@ namespace CSharpDirect
                 {
                     try
                     {
-                        Message msg2 = rcv.fetch(dura);
-                        Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.getContent());
+                        Message msg2 = rcv.Fetch(dura);
+                        Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.GetContent());
                     }
                     catch (Exception e)
                     {
@@ -84,7 +84,7 @@ namespace CSharpDirect
                     }
                 }
 
-                conn.close();
+                conn.Close();
             }
         }
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs Wed Jun  9 11:59:38 2010
@@ -23,7 +23,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
 
 namespace csharp.direct.sender
 {
@@ -50,26 +50,26 @@ namespace csharp.direct.sender
 
             Connection conn = new Connection(host);
 
-            conn.open();
+            conn.Open();
 
-            if (!conn.isOpen())
+            if (!conn.IsOpen())
             {
                 Console.WriteLine("Failed to open connection to host : {0}", host);
             }
             else
             {
-                Session sess = conn.createSession();
+                Session sess = conn.CreateSession();
 
-                Sender snd = sess.createSender(addr);
+                Sender snd = sess.CreateSender(addr);
 
                 for (int i = 0; i < nMsg; i++)
                 {
                     Message msg = new Message(String.Format("Test Message {0}", i));
 
-                    snd.send(msg);
+                    snd.Send(msg);
                 }
 
-                conn.close();
+                conn.Close();
             }
         }
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs Wed Jun  9 11:59:38 2010
@@ -21,10 +21,11 @@
 
 using System;
 using System.Collections.Generic;
-using org.apache.qpid.messaging;
-using org.apache.qpid.messaging.sessionreceiver;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+using Org.Apache.Qpid.Messaging.SessionReceiver;
 
-namespace org.apache.qpid.messaging.examples
+namespace Org.Apache.Qpid.Messaging.Examples
 {
     /// <summary>
     /// A class with functions to display structured messages.
@@ -50,7 +51,7 @@ namespace org.apache.qpid.messaging.exam
                 else if (QpidTypeCheck.ObjectIsList(kvp.Value))
                 {
                     Console.WriteLine("Key: {0}, Value: List", kvp.Key);
-                    ShowList((List<object>)kvp.Value, level + 1);
+                    ShowList((Collection<object>)kvp.Value, level + 1);
                 }
                 else
                     Console.WriteLine("Key: {0}, Value: {1}, Type: {2}",
@@ -63,7 +64,7 @@ namespace org.apache.qpid.messaging.exam
         /// </summary>
         /// <param name="list">The AMQP list</param>
         /// <param name="level">Nested depth</param>
-        public static void ShowList(List<object> list, int level)
+        public static void ShowList(Collection<object> list, int level)
         {
             foreach (object obj in list)
             {
@@ -77,7 +78,7 @@ namespace org.apache.qpid.messaging.exam
                 else if (QpidTypeCheck.ObjectIsList(obj))
                 {
                     Console.WriteLine("List");
-                    ShowList((List<object>)obj, level + 1);
+                    ShowList((Collection<object>)obj, level + 1);
                 }
                 else
                     Console.WriteLine("Value: {0}, Type: {1}",
@@ -92,24 +93,24 @@ namespace org.apache.qpid.messaging.exam
         /// <param name="message">The Message</param>
         public static void ShowMessage(Message message)
         {
-            if ("amqp/map" == message.getContentType())
+            if ("amqp/map" == message.GetContentType())
             {
                 Console.WriteLine("Received a Dictionary");
                 Dictionary<string, object> content = new Dictionary<string, object>();
-                message.getContent(content);
+                message.GetContent(content);
                 ShowDictionary(content, 0);
             }
-            else if ("amqp/list" == message.getContentType())
+            else if ("amqp/list" == message.GetContentType())
             {
                 Console.WriteLine("Received a List");
-                List<object> content = new List<object>();
-                message.getContent(content);
+                Collection<object> content = new Collection<object>();
+                message.GetContent(content);
                 ShowList(content, 0);
             }
             else
             {
                 Console.WriteLine("Received a String");
-                Console.WriteLine(message.getContent());
+                Console.WriteLine(message.GetContent());
             }
         }
     }
@@ -147,7 +148,7 @@ namespace org.apache.qpid.messaging.exam
             //
             // Acknowledge the receipt of all received messages.
             //
-            receiver.getSession().acknowledge();
+            receiver.GetSession().Acknowledge();
         }
 
 
@@ -170,7 +171,7 @@ namespace org.apache.qpid.messaging.exam
             Console.WriteLine("The details of the message body's types and values are shown.");
             Console.WriteLine();
             Console.WriteLine(" url  = target address for 'new Connection(url)'");
-            Console.WriteLine(" addr = address for 'session.createReceiver(addr)'");
+            Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'");
             Console.WriteLine(" nSec = time in seconds to keep the receiver callback open");
             Console.WriteLine();
             Console.WriteLine("Default values:");
@@ -211,20 +212,20 @@ namespace org.apache.qpid.messaging.exam
             // Create and open an AMQP connection to the broker URL
             //
             Connection connection = new Connection(url);
-            connection.open();
+            connection.Open();
 
             //
             // Create a session.
             //
-            Session session = connection.createSession();
+            Session session = connection.CreateSession();
 
             //
             // Receive through callback
             //
             // Create callback server and implicitly start it
             //
-            sessionreceiver.server cbServer =
-                new sessionreceiver.server(session, this);
+            SessionReceiver.CallbackServer cbServer =
+                new SessionReceiver.CallbackServer(session, this);
 
             //
             // The callback server is running and executing callbacks on a
@@ -235,12 +236,12 @@ namespace org.apache.qpid.messaging.exam
             // Create a receiver for the direct exchange using the
             // routing key "map_example".
             //
-            Receiver receiver = session.createReceiver(addr);
+            Receiver receiver = session.CreateReceiver(addr);
 
             //
             // Establish a capacity
             //
-            receiver.setCapacity(100);
+            receiver.SetCapacity(100);
 
             //
             // Wait so many seconds for messages to arrive.
@@ -250,13 +251,13 @@ namespace org.apache.qpid.messaging.exam
             //
             // Stop the callback server.
             //
-            cbServer.close();
+            cbServer.Close();
 
             //
             // Close the receiver and the connection.
             //
-            receiver.close();
-            connection.close();
+            receiver.Close();
+            connection.Close();
         }
     }
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs Wed Jun  9 11:59:38 2010
@@ -21,11 +21,12 @@
 
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
 
-namespace org.apache.qpid.messaging.examples
+namespace Org.Apache.Qpid.Messaging.Examples
 {
     class MapSender
     {
@@ -42,7 +43,7 @@ namespace org.apache.qpid.messaging.exam
             Console.WriteLine("messages to a named exchange with a routing key.");
             Console.WriteLine();
             Console.WriteLine(" url = target address for 'new Connection(url)'");
-            Console.WriteLine(" addr = address for 'session.createReceiver(addr)'");
+            Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'");
             Console.WriteLine(" count = number of messages to send");
             Console.WriteLine();
             Console.WriteLine("Default values:");
@@ -82,14 +83,14 @@ namespace org.apache.qpid.messaging.exam
             // Create and open an AMQP connection to the broker URL
             //
             Connection connection = new Connection(url);
-            connection.open();
+            connection.Open();
 
             //
             // Create a session and a sender to the direct exchange using the
             // routing key "map_example".
             //
-            Session session = connection.createSession();
-            Sender sender = session.createSender(addr);
+            Session session = connection.CreateSession();
+            Sender sender = session.CreateSender(addr);
 
             //
             // Create structured content for the message.  This example builds a
@@ -97,7 +98,7 @@ namespace org.apache.qpid.messaging.exam
             //
             Dictionary<string, object> content = new Dictionary<string, object>();
             Dictionary<string, object> subMap = new Dictionary<string, object>();
-            List<object> colors = new List<object>();
+            Collection<object> colors = new Collection<object>();
 
             content["id"] = 987654321;
             content["name"] = "Widget";
@@ -120,12 +121,12 @@ namespace org.apache.qpid.messaging.exam
             //
             Message message = new Message(content);
             for (UInt32 i = 0; i<count; i++)
-                sender.send(message, true);
+                sender.Send(message, true);
 
             //
             // Close the connection.
             //
-            connection.close();
+            connection.Close();
         }
     }
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs Wed Jun  9 11:59:38 2010
@@ -21,16 +21,15 @@
 
 using System;
 using System.Collections.Generic;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
 
-namespace org.apache.qpid.messaging.examples
+namespace Org.Apache.Qpid.Messaging.examples
 {
     class MapReceiver
     {
         static void Main(string[] args)
         {
             string url = "amqp:tcp:localhost:5672";
-//            string url = "10.16.18.254:5672";
             if (args.Length > 0)
                 url = args[0];
 
@@ -38,37 +37,37 @@ namespace org.apache.qpid.messaging.exam
             // Create and open an AMQP connection to the broker URL
             //
             Connection connection = new Connection(url);
-            connection.open();
+            connection.Open();
 
             //
             // Create a session and a receiver fir the direct exchange using the
             // routing key "map_example".
             //
-            Session session = connection.createSession();
-            Receiver receiver = session.createReceiver("amq.direct/map_example");
+            Session session = connection.CreateSession();
+            Receiver receiver = session.CreateReceiver("amq.direct/map_example");
 
             //
             // Fetch the message from the broker (wait indefinitely by default)
             //
-            Message message = receiver.fetch(new Duration(60000));
+            Message message = receiver.Fetch(new Duration(60000));
 
             //
             // Extract the structured content from the message.
             //
             Dictionary<string, object> content = new Dictionary<string, object>();
-            message.getContent(content);
+            message.GetContent(content);
             Console.WriteLine("Received: {0}", content);
 
             //
             // Acknowledge the receipt of all received messages.
             //
-            session.acknowledge();
+            session.Acknowledge();
 
             //
             // Close the receiver and the connection.
             //
-            receiver.close();
-            connection.close();
+            receiver.Close();
+            connection.Close();
         }
     }
 }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs Wed Jun  9 11:59:38 2010
@@ -21,11 +21,12 @@
 
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
 
-namespace org.apache.qpid.messaging.examples
+namespace Org.Apache.Qpid.Messaging.examples
 {
     class MapSender
     {
@@ -39,14 +40,14 @@ namespace org.apache.qpid.messaging.exam
             // Create and open an AMQP connection to the broker URL
             //
             Connection connection = new Connection(url);
-            connection.open();
+            connection.Open();
 
             //
             // Create a session and a sender to the direct exchange using the
             // routing key "map_example".
             //
-            Session session = connection.createSession();
-            Sender sender = session.createSender("amq.direct/map_example");
+            Session session = connection.CreateSession();
+            Sender sender = session.CreateSender("amq.direct/map_example");
 
             //
             // Create structured content for the message.  This example builds a
@@ -54,7 +55,7 @@ namespace org.apache.qpid.messaging.exam
             //
             Dictionary<string, object> content = new Dictionary<string, object>();
             Dictionary<string, object> subMap = new Dictionary<string, object>();
-            List<object> colors = new List<object>();
+            Collection<object> colors = new Collection<object>();
 
             content["id"] = 987654321;
             content["name"] = "Widget";
@@ -76,12 +77,12 @@ namespace org.apache.qpid.messaging.exam
             // via the sender.
             //
             Message message = new Message(content);
-            sender.send(message, true);
+            sender.Send(message, true);
 
             //
             // Close the connection.
             //
-            connection.close();
+            connection.Close();
         }
     }
 }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp Wed Jun  9 11:59:38 2010
@@ -30,10 +30,10 @@
 #include "QpidTypeCheck.h"
 #include "TypeTranslator.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Address is a managed wrapper for a qpid::messaging::Address
@@ -58,10 +58,10 @@ namespace messaging {
                          System::String ^, System::Object ^> ^ options) :
         addressp(new ::qpid::messaging::Address())
     {
-        setName(name);
-        setSubject(subject);
-        setOptions(options);
-        setType("");
+        SetName(name);
+        SetSubject(subject);
+        SetOptions(options);
+        SetType("");
     }
 
 
@@ -72,10 +72,10 @@ namespace messaging {
                      System::String ^ type) :
         addressp(new ::qpid::messaging::Address())
     {
-        setName(name);
-        setSubject(subject);
-        setOptions(options);
-        setType(type);
+        SetName(name);
+        SetSubject(subject);
+        SetOptions(options);
+        SetType(type);
     }
 
 
@@ -114,12 +114,12 @@ namespace messaging {
     //
     // name
     //
-    System::String ^ Address::getName()
+    System::String ^ Address::GetName()
     {
         return gcnew System::String(addressp->getName().c_str());
     }
 
-    void Address::setName(System::String ^ name)
+    void Address::SetName(System::String ^ name)
     {
         addressp->::qpid::messaging::Address::setName(QpidMarshal::ToNative(name));
     }
@@ -127,21 +127,21 @@ namespace messaging {
     //
     // subject
     //
-    System::String ^ Address::getSubject()
+    System::String ^ Address::GetSubject()
     {
         return gcnew System::String(addressp->getSubject().c_str());
     }
 
-    void Address::setSubject(System::String ^ subject)
+    void Address::SetSubject(System::String ^ subject)
     {
-        addressp->setName(QpidMarshal::ToNative(subject));
+        addressp->setSubject(QpidMarshal::ToNative(subject));
     }
 
     //
     // options
     //
     System::Collections::Generic::Dictionary<
-        System::String ^, System::Object ^> ^ Address::getOptions()
+        System::String ^, System::Object ^> ^ Address::GetOptions()
     {
         ::qpid::types::Variant::Map map;
         System::Collections::Generic::Dictionary<
@@ -149,37 +149,37 @@ namespace messaging {
             gcnew System::Collections::Generic::Dictionary<
                   System::String ^, System::Object ^>;
         map = addressp->getOptions();
-        TypeTranslator::NativeToManaged(newMap, map);
+        TypeTranslator::NativeToManaged(map, newMap);
         return newMap;
     }
 
 
-    void Address::setOptions(System::Collections::Generic::Dictionary<
+    void Address::SetOptions(System::Collections::Generic::Dictionary<
                         System::String ^, System::Object ^> ^ options)
     {
         ::qpid::types::Variant::Map map;
-        TypeTranslator::ManagedToNative(map, options);
+        TypeTranslator::ManagedToNative(options, map);
         addressp->setOptions(map);
     }
 
     //
     // type
     //
-    System::String ^ Address::getType()
+    System::String ^ Address::GetType()
     {
         return gcnew System::String(addressp->getType().c_str());
     }
 
 
-    void Address::setType(System::String ^ type)
+    void Address::SetType(System::String ^ type)
     {
         addressp->setName(QpidMarshal::ToNative(type));
     }
 
     //
-    // str
+    // ToString
     //
-    System::String ^ Address::str()
+    System::String ^ Address::ToStr()
     {
         return gcnew System::String(addressp->str().c_str());
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Address.h Wed Jun  9 11:59:38 2010
@@ -27,11 +27,10 @@
 
 #include "qpid/messaging/Address.h"
 
-
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Address is a managed wrapper for a qpid::messaging::Address
@@ -43,10 +42,10 @@ namespace messaging {
         // Kept object deletion code
         void Cleanup();
 
-    public:
         // The kept object in the Messaging C++ DLL
         ::qpid::messaging::Address * addressp;
 
+    public:
         Address();
         
         Address(System::String ^ address);
@@ -69,21 +68,26 @@ namespace messaging {
         !Address();
 //        Address(const Address % rhs);
 
-        System::String ^ getName();
-        void setName(System::String ^ name);
+        property ::qpid::messaging::Address * NativeAddress
+        {
+            ::qpid::messaging::Address * get () { return addressp; }
+        }
+
+        System::String ^ GetName();
+        void SetName(System::String ^ name);
 
-        System::String ^ getSubject();
-        void setSubject(System::String ^ subject);
+        System::String ^ GetSubject();
+        void SetSubject(System::String ^ subject);
 
         System::Collections::Generic::Dictionary<
-            System::String ^, System::Object ^> ^ getOptions();
+            System::String ^, System::Object ^> ^ GetOptions();
 
-        void setOptions(System::Collections::Generic::Dictionary<
+        void SetOptions(System::Collections::Generic::Dictionary<
                             System::String ^, System::Object ^> ^ options);
 
-        System::String ^ getType();
-        void setType(System::String ^ type);
+        System::String ^ GetType();
+        void SetType(System::String ^ type);
 
-        System::String ^ str();
+        System::String ^ ToStr();
     };
 }}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp Wed Jun  9 11:59:38 2010
@@ -33,10 +33,10 @@
 #include "QpidException.h"
 #include "TypeTranslator.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Connection is a managed wrapper for a qpid::messaging::Connection
@@ -56,7 +56,7 @@ namespace messaging {
     {
         for each (System::Collections::Generic::KeyValuePair<System::String^, System::Object^> kvp in options)
         {
-            setOption(kvp.Key, kvp.Value);
+            SetOption(kvp.Key, kvp.Value);
         }
     }
 
@@ -94,7 +94,7 @@ namespace messaging {
     }
 
 
-    void Connection::setOption(System::String ^ name, System::Object ^ value)
+    void Connection::SetOption(System::String ^ name, System::Object ^ value)
     {
         ::qpid::types::Variant entryValue;
         TypeTranslator::ManagedToNativeObject(value, entryValue);
@@ -102,31 +102,31 @@ namespace messaging {
         connectionp->::qpid::messaging::Connection::setOption(entryName, entryValue);
     }
 
-    void Connection::open()
+    void Connection::Open()
     {
         connectionp->open();
     }
 
-    System::Boolean Connection::isOpen()
+    System::Boolean Connection::IsOpen()
     {
         return connectionp->isOpen();
     }
 
-    void Connection::close()
+    void Connection::Close()
     {
         connectionp->close();
     }
 
     //
-    // createTransactionalSession()
+    // CreateTransactionalSession()
     //
-    Session ^ Connection::createTransactionalSession()
+    Session ^ Connection::CreateTransactionalSession()
     {
-        return createTransactionalSession("");
+        return CreateTransactionalSession("");
     }
 
 
-    Session ^ Connection::createTransactionalSession(System::String ^ name)
+    Session ^ Connection::CreateTransactionalSession(System::String ^ name)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Session * sessionp     = NULL;
@@ -148,42 +148,44 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Connection::createTransactionalSession unknown error");
-        }
         finally
         {
             // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
-                throw newException;
+                if (newSession != nullptr)
+				{
+					delete newSession;
+				}
+				else
+				{
+	                if (sessionp != NULL)
+		            {
+			            delete sessionp;
+				    }
+				}
             }
         }
 
-        return newSession;
+        if (newException != nullptr)
+        {
+            throw newException;
+        }
+
+		return newSession;
     }
 
 
     //
-    // createSession()
+    // CreateSession()
     //
-    Session ^ Connection::createSession()
+    Session ^ Connection::CreateSession()
     {
-        return createSession("");
+        return CreateSession("");
     }
 
 
-    Session ^ Connection::createSession(System::String ^ name)
+    Session ^ Connection::CreateSession(System::String ^ name)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Session * sessionp     = NULL;
@@ -205,33 +207,35 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Connection::createSession unknown error");
-        }
         finally
         {
             // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
-                throw newException;
+				if (newSession != nullptr)
+				{
+					delete newSession;
+				}
+				else
+				{
+					if (sessionp != NULL)
+					{
+						delete sessionp;
+					}
+				}
             }
         }
 
+		if (nullptr != newException) 
+		{
+			throw newException;
+		}
+
         return newSession;
     }
 
 
-    Session ^ Connection::getSession(System::String ^ name)
+    Session ^ Connection::GetSession(System::String ^ name)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Session * sess         = NULL;
@@ -250,28 +254,30 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Connection::getSession unknown error");
-        }
         finally
         {
             // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
-                if (sess != NULL)
-                {
-                    delete sess;
-                }
-                throw newException;
+				if (newSession != nullptr)
+				{
+					delete newSession;
+				}
+				else
+				{
+					if (sess != NULL)
+					{
+						delete sess;
+					}
+				}
             }
         }
 
+		if (nullptr != newException) 
+		{
+			throw newException;
+		}
+
         return newSession;
     }
 }}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h Wed Jun  9 11:59:38 2010
@@ -28,10 +28,10 @@
 #include "qpid/messaging/Connection.h"
 #include "qpid/messaging/Session.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Connection is a managed wrapper for a qpid::messaging::Connection
@@ -59,20 +59,20 @@ namespace messaging {
         ~Connection();
         !Connection();
 
-        void setOption(System::String ^ name, System::Object ^ value);
+        void SetOption(System::String ^ name, System::Object ^ value);
 
-        void open();
-        System::Boolean isOpen();
-        void close();
+        void Open();
+        System::Boolean IsOpen();
+        void Close();
 
-        // createTransactionalSession()
-        Session ^ createTransactionalSession();
-        Session ^ createTransactionalSession(System::String ^ name);
+        // CreateTransactionalSession()
+        Session ^ CreateTransactionalSession();
+        Session ^ CreateTransactionalSession(System::String ^ name);
 
-        // createSession()
-        Session ^ createSession();
-        Session ^ createSession(System::String ^ name);
+        // CreateSession()
+        Session ^ CreateSession();
+        Session ^ CreateSession(System::String ^ name);
 
-        Session ^ getSession(System::String ^ name);
+        Session ^ GetSession(System::String ^ name);
     };
 }}}}

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=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Duration.h Wed Jun  9 11:59:38 2010
@@ -25,17 +25,17 @@
 #include <string>
 #include <limits>
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Duration is a time interval in milliseconds.
     /// It is a managed equivalent of ::qpid::messaging::Duration
     /// </summary>
 
-    public ref class Duration
+    public ref class Duration sealed
     {
     private:
         System::UInt64 milliseconds;
@@ -69,10 +69,25 @@ namespace messaging {
             Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
             return result;
         }
-    };
 
-    public ref class DurationConstants
+        static Duration ^ Multiply (Duration ^ dur, const System::UInt64 multiplier)
+        {
+            Duration ^ result = gcnew Duration(dur->Milliseconds * multiplier);
+            return result;
+        }
+
+        static Duration ^ Multiply (const System::UInt64 multiplier, Duration ^ dur)
+        {
+            Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
+            return result;
+        }
+	};
+
+    public ref class DurationConstants sealed
     {
+	private:
+		DurationConstants::DurationConstants() {}
+
     public:
         static Duration ^ FORVER;
         static Duration ^ IMMEDIATE;

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp Wed Jun  9 11:59:38 2010
@@ -36,10 +36,10 @@
 #include "QpidException.h"
 #include "TypeTranslator.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Message is a managed wrapper for a ::qpid::messaging::Message
@@ -52,19 +52,16 @@ namespace messaging {
     }
 
     // Create from string
-    Message::Message(System::String ^ string) :
-        messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative(string)))
+    Message::Message(System::String ^ theStr) :
+        messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative(theStr)))
     {
     }
 
     // Create from object
-    Message::Message(System::Object ^ objp) :
+    Message::Message(System::Object ^ theValue) :
         messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative("")))
     {
-        ::qpid::types::Variant * variantp  = 0;
-        std::string            * variantsp = 0;
-
-        if (QpidTypeCheck::ObjectIsMap(objp))
+        if (QpidTypeCheck::ObjectIsMap(theValue))
         {
             // Create a mapped message using given dictionary
 
@@ -72,7 +69,7 @@ namespace messaging {
             ::qpid::types::Variant::Map newMap;
 
             // Add the map variables to the map
-            TypeTranslator::ManagedToNative(newMap, (QpidMap ^)objp);
+            TypeTranslator::ManagedToNative((QpidMap ^)theValue, newMap);
 
             // Set message content type
             messagep->setContentType("ampq/map");
@@ -80,7 +77,7 @@ namespace messaging {
             // Insert the map into the message
             ::qpid::messaging::encode(newMap, *messagep, QpidMarshal::ToNative("amqp/map"));
         }
-        else if (QpidTypeCheck::ObjectIsList(objp))
+        else if (QpidTypeCheck::ObjectIsList(theValue))
         {
             // Create a list message using given list
 
@@ -88,7 +85,7 @@ namespace messaging {
             ::qpid::types::Variant::List newList;
 
             // Add the list variables to the list
-            TypeTranslator::ManagedToNative(newList, (QpidList ^)objp);
+            TypeTranslator::ManagedToNative((QpidList ^)theValue, newList);
 
             // Set message content type
             messagep->setContentType("ampq/list");
@@ -99,7 +96,7 @@ namespace messaging {
         else
         {
             // Create a binary string message
-            messagep->setContent(QpidMarshal::ToNative(objp->ToString()));
+            messagep->setContent(QpidMarshal::ToNative(theValue->ToString()));
         }
     }
 
@@ -145,12 +142,12 @@ namespace messaging {
     //
     // ReplyTo
     //
-    void Message::setReplyTo(Address ^ address)
+    void Message::SetReplyTo(Address ^ address)
     {
-        messagep->setReplyTo(*(address->addressp));
+        messagep->setReplyTo(*(address->NativeAddress));
     }
 
-    Address ^ Message::getReplyTo()
+    Address ^ Message::GetReplyTo()
     {
         const ::qpid::messaging::Address & addrp =
             messagep->::qpid::messaging::Message::getReplyTo();
@@ -162,12 +159,12 @@ namespace messaging {
     //
     // Subject
     //
-    void Message::setSubject(System::String ^ subject)
+    void Message::SetSubject(System::String ^ subject)
     {
         messagep->setSubject(QpidMarshal::ToNative(subject));
     }
     
-    System::String ^ Message::getSubject()
+    System::String ^ Message::GetSubject()
     {
         return gcnew String(messagep->getSubject().c_str());
     }
@@ -176,26 +173,26 @@ namespace messaging {
     //
     // ContentType
     //
-    void Message::setContentType(System::String ^ ct)
+    void Message::SetContentType(System::String ^ ct)
     {
         messagep->setContentType(QpidMarshal::ToNative(ct));
     }
     
-    System::String ^ Message::getContentType()
+	System::String ^ Message::GetContentType()
     {
-        return gcnew String(messagep->getContentType().c_str());
+		return gcnew String(messagep->::qpid::messaging::Message::getContentType().c_str());
     }
     
     
     //
     // MessageId
     //
-    void Message::setMessageId(System::String ^ mId)
+    void Message::SetMessageId(System::String ^ messageId)
     {
-        messagep->setMessageId(QpidMarshal::ToNative(mId));
+        messagep->setMessageId(QpidMarshal::ToNative(messageId));
     }
     
-    System::String ^ Message::getMessageId()
+    System::String ^ Message::GetMessageId()
     {
         return gcnew String(messagep->getMessageId().c_str());
     }
@@ -204,12 +201,12 @@ namespace messaging {
     //
     // UserId
     //
-    void Message::setUserId(System::String ^ uId)
+    void Message::SetUserId(System::String ^ uId)
     {
         messagep->setUserId(QpidMarshal::ToNative(uId));
     }
     
-    System::String ^ Message::getUserId()
+    System::String ^ Message::GetUserId()
     {
         return gcnew String(messagep->getUserId().c_str());
     }
@@ -218,12 +215,12 @@ namespace messaging {
     //
     // CorrelationId
     //
-    void Message::setCorrelationId(System::String ^ cId)
+    void Message::SetCorrelationId(System::String ^ correlationId)
     {
-        messagep->setCorrelationId(QpidMarshal::ToNative(cId));
+        messagep->setCorrelationId(QpidMarshal::ToNative(correlationId));
     }
     
-    System::String ^ Message::getCorrelationId()
+    System::String ^ Message::GetCorrelationId()
     {
         return gcnew String(messagep->getCorrelationId().c_str());
     }
@@ -232,12 +229,12 @@ namespace messaging {
     //
     // Priority
     //
-    void Message::setPriority(unsigned char priority)
+    void Message::SetPriority(unsigned char priority)
     {
         messagep->setPriority(priority);
     }
     
-    unsigned char Message::getPriority()
+    unsigned char Message::GetPriority()
     {
         return messagep->getPriority();
     }
@@ -246,44 +243,44 @@ namespace messaging {
     //
     // Ttl
     //
-    void Message::setTtl(Duration ^ ttl)
+    void Message::SetTtl(Duration ^ ttl)
     {
         ::qpid::messaging::Duration dur(ttl->Milliseconds);
 
         messagep->setTtl(dur);
     }
     
-    Duration ^ Message::getTtl()
+    Duration ^ Message::GetTtl()
     {
         Duration ^ dur = gcnew Duration(messagep->getTtl().getMilliseconds());
 
         return dur;
     }
 
-    void Message::setDurable(bool durable)
+    void Message::SetDurable(bool durable)
     {
         messagep->setDurable(durable);
     }
     
-    bool Message::getDurable()
+    bool Message::GetDurable()
     {
         return messagep->getDurable();
     }
 
 
-    bool Message::getRedelivered()
+    bool Message::GetRedelivered()
     {
         return messagep->getRedelivered();
     }
 
-    void Message::setRedelivered(bool redelivered)
+    void Message::SetRedelivered(bool redelivered)
     {
         messagep->setRedelivered(redelivered);
     }
 
 
     System::Collections::Generic::Dictionary<
-            System::String^, System::Object^> ^ Message::getProperties()
+            System::String^, System::Object^> ^ Message::GetProperties()
     {
         ::qpid::types::Variant::Map map;
 
@@ -294,19 +291,19 @@ namespace messaging {
             gcnew System::Collections::Generic::Dictionary<
                       System::String^, System::Object^> ;
 
-        TypeTranslator::NativeToManaged(dict, map);
+        TypeTranslator::NativeToManaged(map, dict);
 
         return dict;
     }
 
 
-    void Message::setContent(System::String ^ content)
+    void Message::SetContent(System::String ^ content)
     {
         messagep->setContent(QpidMarshal::ToNative(content));
     }
 
 
-    System::String ^ Message::getContent()
+    System::String ^ Message::GetContent()
     {
         return gcnew String(messagep->getContent().c_str());
     }
@@ -315,7 +312,7 @@ namespace messaging {
     //
     // User wants to extract a Dictionary from the message
     //
-    void Message::getContent(System::Collections::Generic::Dictionary<
+    void Message::GetContent(System::Collections::Generic::Dictionary<
                                 System::String^, 
                                 System::Object^> ^ dict)
     {
@@ -324,14 +321,14 @@ namespace messaging {
         
         ::qpid::messaging::decode(*messagep, map, QpidMarshal::ToNative("amqp/map"));
 
-        TypeTranslator::NativeToManaged(dict, map);
+        TypeTranslator::NativeToManaged(map, dict);
     }
 
 
     //
     // User wants to extract a list from the message
     //
-    void Message::getContent(System::Collections::Generic::List<
+    void Message::GetContent(System::Collections::ObjectModel::Collection<
                         System::Object^> ^ list)
     {
         // allocate a native messaging::List
@@ -341,22 +338,22 @@ namespace messaging {
         ::qpid::messaging::decode(*messagep, nativeList, QpidMarshal::ToNative("amqp/list"));
 
         // translate native list into user's managed list
-        TypeTranslator::NativeToManaged(list, nativeList);
+        TypeTranslator::NativeToManaged(nativeList, list);
     }
 
     //
     // User wants content as bytes.
     // result array must be correct size already
     //
-    void Message::getRaw(array<System::Byte> ^ arr)
+    void Message::GetRaw(array<System::Byte> ^ arr)
     {
         System::UInt32 size = messagep->getContentSize();
      
         if (0 == size)
-            throw gcnew QpidException("Message::getRaw - message size is zero");
+            throw gcnew QpidException("Message::GetRaw - message size is zero");
 
         if (arr->Length != size)
-            throw gcnew QpidException("Message::getRaw - receive buffer is too small");
+            throw gcnew QpidException("Message::GetRaw - receive buffer is too small");
 
         const char * ptr = messagep->getContentPtr();
 
@@ -369,7 +366,7 @@ namespace messaging {
     }
 
 
-    System::UInt64 Message::getContentSize()
+    System::UInt64 Message::GetContentSize()
     {
         return messagep->getContentSize();
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h Wed Jun  9 11:59:38 2010
@@ -26,10 +26,10 @@
 
 #include "qpid/messaging/Message.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     ref class Address;
     ref class Duration;
@@ -45,15 +45,18 @@ namespace messaging {
         // Kept object deletion code
         void Cleanup();
 
+        // The kept object in the Messaging C++ DLL
+        ::qpid::messaging::Message * messagep;
+
     public:
         // Create empty message
         Message();
 
         // Create from String
-        Message(System::String ^ string);
+        Message(System::String ^ theStr);
 
         // Create from object
-        Message(System::Object ^ obj);
+        Message(System::Object ^ theValue);
 
         // TODO: Create from bytes
         // Message(System::Byte [] ^ bytes);
@@ -67,62 +70,64 @@ namespace messaging {
         // Copy constructor
         Message(const Message % rhs);
 
-        // The kept object in the Messaging C++ DLL
-        ::qpid::messaging::Message * messagep;
+        property ::qpid::messaging::Message * NativeMessage
+        {
+            ::qpid::messaging::Message * get () { return messagep; }
+        }
 
-        void setReplyTo(Address ^ address);
-        Address ^ getReplyTo();
+        void SetReplyTo(Address ^ address);
+        Address ^ GetReplyTo();
 
-        void setSubject(System::String ^ subject);
-        System::String ^ getSubject();
+        void SetSubject(System::String ^ subject);
+        System::String ^ GetSubject();
 
-        void setContentType(System::String ^ ct);
-        System::String ^ getContentType();
+        void SetContentType(System::String ^ ct);
+        System::String ^ GetContentType();
         
-        void setMessageId(System::String ^ mId);
-        System::String ^ getMessageId();
+        void SetMessageId(System::String ^ messageId);
+        System::String ^ GetMessageId();
         
-        void setUserId(System::String ^ uId);
-        System::String ^ getUserId();
+        void SetUserId(System::String ^ uId);
+        System::String ^ GetUserId();
         
-        void setCorrelationId(System::String ^ cId);
-        System::String ^ getCorrelationId();
+        void SetCorrelationId(System::String ^ correlationId);
+        System::String ^ GetCorrelationId();
 
-        void setPriority(unsigned char priority);
-        unsigned char getPriority();
+        void SetPriority(unsigned char priority);
+        unsigned char GetPriority();
 
-        void setTtl(Duration ^ ttl);
-        Duration ^ getTtl();
+        void SetTtl(Duration ^ ttl);
+        Duration ^ GetTtl();
 
-        void setDurable(bool durable);
-        bool getDurable();
+        void SetDurable(bool durable);
+        bool GetDurable();
 
-        bool getRedelivered();
-        void setRedelivered(bool redelivered);
+        bool GetRedelivered();
+        void SetRedelivered(bool redelivered);
 
         System::Collections::Generic::Dictionary<
-            System::String^, System::Object^> ^ getProperties();
+            System::String^, System::Object^> ^ GetProperties();
 
-        void setContent(System::String ^ content);
+        void SetContent(System::String ^ content);
 
         //TODO:: void setContent(Bytes{} bytes, offset, length);
 
         // get content as string
-        System::String ^ getContent();
+        System::String ^ GetContent();
 
         // get content as dictionary
-        void getContent(System::Collections::Generic::Dictionary<
+        void GetContent(System::Collections::Generic::Dictionary<
                             System::String^, 
                             System::Object^> ^ dict);
 
         // get content as map
-        void getContent(System::Collections::Generic::List<
+        void GetContent(System::Collections::ObjectModel::Collection<
                             System::Object^> ^);
 
         // get content as bytes
-        void getRaw(cli::array<System::Byte> ^ arr);
+        void GetRaw(cli::array<System::Byte> ^ arr);
 
-        System::UInt64 getContentSize();
+        System::UInt64 GetContentSize();
 
         //TODO: EncodingException
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h Wed Jun  9 11:59:38 2010
@@ -19,19 +19,23 @@
 
 #pragma once
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
 using namespace System;
 
+[Serializable]
 public ref class QpidException : System::Exception
 {
  public:
 
- QpidException() : System::Exception() {}
- QpidException(String^ estring) : System::Exception(estring) {}
+ QpidException() 
+	 : System::Exception() {}
+
+ QpidException(String^ estring) 
+	 : System::Exception(estring) {}
 
 };
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h Wed Jun  9 11:59:38 2010
@@ -22,10 +22,10 @@
 using namespace System;
 using namespace System::Text;
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
 
 
@@ -33,6 +33,9 @@ namespace messaging {
 
 private ref class QpidMarshal
 {
+private:
+	QpidMarshal::QpidMarshal() {}
+
 public:
 
     /// <summary>

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h Wed Jun  9 11:59:38 2010
@@ -24,10 +24,10 @@
 #include <string>
 #include <limits>
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// QpidTypeCheck determines if a given managed object represents
@@ -35,7 +35,7 @@ namespace messaging {
     ///
     // The supported mapping is:
     /// * a managed Dictionary and a Qpid Messaging Map
-    /// * a managed List       and a Qpid Messaging List
+    /// * a managed Collection and a Qpid Messaging List
     /// </summary>
 
     typedef System::Collections::Generic::Dictionary<
@@ -43,33 +43,38 @@ namespace messaging {
                 System::Object^> 
                     QpidMap;
 
-    typedef System::Collections::Generic::List<
+    typedef System::Collections::ObjectModel::Collection<
                 System::Object^> 
                     QpidList;
 
-    private ref class QpidTypeCheckConstants
+    private ref class QpidTypeCheckConstants sealed
     {
+	private:
+		QpidTypeCheckConstants::QpidTypeCheckConstants() {}
+
     public:
         static System::Type const ^ const mapTypeP = System::Type::GetType(
             "System.Collections.Generic.Dictionary`2[System.String,System.Object]");
         static System::Type const ^ const listTypeP = System::Type::GetType(
-            "System.Collections.Generic.List`1[System.Object]");
+            "System.Collections.ObjectModel.Collection`1[System.Object]");
     };
 
 
-    public ref class QpidTypeCheck
+    public ref class QpidTypeCheck sealed
     {
+	private:
+		QpidTypeCheck::QpidTypeCheck() {}
 
     public:
 
-        static bool ObjectIsMap (System::Object ^ object)
+        static bool ObjectIsMap (System::Object ^ theValue)
         { 
-            return (*object).GetType() == QpidTypeCheckConstants::mapTypeP;
+            return (*theValue).GetType() == QpidTypeCheckConstants::mapTypeP;
         }
 
-        static bool ObjectIsList(System::Object ^ object)
+        static bool ObjectIsList(System::Object ^ theValue)
         { 
-            return (*object).GetType() == QpidTypeCheckConstants::listTypeP;
+            return (*theValue).GetType() == QpidTypeCheckConstants::listTypeP;
         }
     };
 }}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt Wed Jun  9 11:59:38 2010
@@ -1,13 +1,13 @@
 ========================================================================
-    DYNAMIC LINK LIBRARY : org.apache.qpid.messaging Project Overview
+    DYNAMIC LINK LIBRARY : Org.Apache.Qpid.Messaging Project Overview
 ========================================================================
 
-AppWizard has created this org.apache.qpid.messaging DLL for you.  
+AppWizard has created this Org.Apache.Qpid.Messaging DLL for you.  
 
 This file contains a summary of what you will find in each of the files that
-make up your org.apache.qpid.messaging application.
+make up your Org.Apache.Qpid.Messaging application.
 
-org.apache.qpid.messaging.vcproj
+Org.Apache.Qpid.Messaging.vcproj
     This is the main project file for VC++ projects generated using an Application Wizard. 
     It contains information about the version of Visual C++ that generated the file, and 
     information about the platforms, configurations, and project features selected with the

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp Wed Jun  9 11:59:38 2010
@@ -34,10 +34,10 @@
 #include "Duration.h"
 #include "QpidException.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Receiver is a managed wrapper for a ::qpid::messaging::Receiver
@@ -85,30 +85,30 @@ namespace messaging {
     }
 
     //
-    // get(message)
+    // Get(message)
     //
-    bool Receiver::get(Message ^ mmsgp)
+    bool Receiver::Get(Message ^ mmsgp)
     {
-        return get(mmsgp, DurationConstants::FORVER);
+        return Get(mmsgp, DurationConstants::FORVER);
     }
 
-    bool Receiver::get(Message ^ mmsgp, Duration ^ durationp)
+    bool Receiver::Get(Message ^ mmsgp, Duration ^ durationp)
     {
         ::qpid::messaging::Duration dur((*durationp).Milliseconds);
 
-        return receiverp->Receiver::get(*(mmsgp->messagep), dur);
+        return receiverp->Receiver::get(*(mmsgp->NativeMessage), dur);
     }
 
     //
-    // message = get()
+    // message = Get()
     //
-    Message ^ Receiver::get()
+    Message ^ Receiver::Get()
     {
-        return get(DurationConstants::FORVER);
+        return Get(DurationConstants::FORVER);
     }
 
 
-    Message ^ Receiver::get(Duration ^ durationp)
+    Message ^ Receiver::Get(Duration ^ durationp)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Message * msgp         = NULL;
@@ -133,58 +133,54 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Receiver:get unknown error");
-        }
         finally
         {
-            // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
                 if (msgp != NULL)
                 {
                     delete msgp;
                 }
-
-                throw newException;
+				if (newMessage != nullptr)
+				{
+					delete newMessage;
+				}
             }
         }
+        if (newException != nullptr)
+        {
+			throw newException;
+		}
 
         return newMessage;
     }
 
     //
-    // fetch(message)
+    // Fetch(message)
     //
-    bool Receiver::fetch(Message ^ mmsgp)
+    bool Receiver::Fetch(Message ^ mmsgp)
     {
-        return fetch(mmsgp, DurationConstants::FORVER);
+        return Fetch(mmsgp, DurationConstants::FORVER);
     }
 
-    bool Receiver::fetch(Message ^ mmsgp, Duration ^ durationp)
+    bool Receiver::Fetch(Message ^ mmsgp, Duration ^ durationp)
     {
         ::qpid::messaging::Duration dur((*durationp).Milliseconds);
 
-        return receiverp->::qpid::messaging::Receiver::fetch(*((*mmsgp).messagep), dur);
+        return receiverp->::qpid::messaging::Receiver::fetch(*((*mmsgp).NativeMessage), dur);
     }
     
 
     //
-    // message = fetch()
+    // message = Fetch()
     //
 
-    Message ^ Receiver::fetch()
+    Message ^ Receiver::Fetch()
     {
-        return fetch(DurationConstants::FORVER);
+        return Fetch(DurationConstants::FORVER);
     }
 
-    Message ^ Receiver::fetch(Duration ^ durationp)
+    Message ^ Receiver::Fetch(Duration ^ durationp)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Message * msgp         = NULL;
@@ -209,64 +205,59 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Receiver:fetch unknown error");
-
-        }
         finally
         {
-            // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
                 if (msgp != NULL)
                 {
                     delete msgp;
                 }
-
-                throw newException;
+				if (newMessage != nullptr)
+				{
+					delete newMessage;
+				}
             }
         }
+        if (newException != nullptr)
+        {
+			throw newException;
+		}
 
         return newMessage;
     }
 
-    void Receiver::setCapacity(System::UInt32 capacity)
+    void Receiver::SetCapacity(System::UInt32 capacity)
     {
         receiverp->setCapacity(capacity);
     }
 
-    System::UInt32 Receiver::getCapacity()
+    System::UInt32 Receiver::GetCapacity()
     {
         return receiverp->getCapacity();
     }
 
-    System::UInt32 Receiver::getAvailable()
+    System::UInt32 Receiver::GetAvailable()
     {
         return receiverp->getAvailable();
     }
 
-    System::UInt32 Receiver::getUnsettled()
+    System::UInt32 Receiver::GetUnsettled()
     {
         return receiverp->getUnsettled();
     }
 
-    void Receiver::close()
+    void Receiver::Close()
     {
         receiverp->close();
     }
 
-    System::String ^ Receiver::getName()
+    System::String ^ Receiver::GetName()
     {
         return gcnew System::String(receiverp->getName().c_str());
     }
 
-    Session ^ Receiver::getSession()
+    Session ^ Receiver::GetSession()
     {
         return parentSession;
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h Wed Jun  9 11:59:38 2010
@@ -35,10 +35,10 @@ namespace messaging {
     class ReceiverImpl {};
 }}
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Mreceiver is a managed wrapper for a ::qpid::messaging::Receiver
@@ -57,38 +57,43 @@ namespace messaging {
         // Kept object deletion code
         void Cleanup();
 
-    public:
         // The kept object in the Messaging C++ DLL
         ::qpid::messaging::Receiver * receiverp;
 
+    public:
         Receiver(::qpid::messaging::Receiver * r,
             Session ^ sessRef);
         ~Receiver();
         !Receiver();
         Receiver(const Receiver ^ rhs);
 
-        // get(message)
-        bool get(Message ^ mmsgp);
-        bool get(Message ^ mmsgp, Duration ^ durationp);
-
-        // message = get()
-        Message ^ get();
-        Message ^ get(Duration ^ durationp);
-
-        // fetch(message)
-        bool fetch(Message ^ mmsgp);
-        bool fetch(Message ^ mmsgp, Duration ^ duration);
-
-        // message = fetch()
-        Message ^ fetch();
-        Message ^ fetch(Duration ^ durationp);
-
-        void setCapacity(System::UInt32 capacity);
-        System::UInt32 getCapacity();
-        System::UInt32 getAvailable();
-        System::UInt32 getUnsettled();
-        void close();
-        System::String ^ getName();
-        Session ^ getSession();
+        property ::qpid::messaging::Receiver * NativeReceiver
+        {
+            ::qpid::messaging::Receiver * get () { return receiverp; }
+        }
+
+        // Get(message)
+        bool Get(Message ^ mmsgp);
+        bool Get(Message ^ mmsgp, Duration ^ durationp);
+
+        // message = Get()
+        Message ^ Get();
+        Message ^ Get(Duration ^ durationp);
+
+        // Fetch(message)
+        bool Fetch(Message ^ mmsgp);
+        bool Fetch(Message ^ mmsgp, Duration ^ duration);
+
+        // message = Fetch()
+        Message ^ Fetch();
+        Message ^ Fetch(Duration ^ durationp);
+
+        void SetCapacity(System::UInt32 capacity);
+        System::UInt32 GetCapacity();
+        System::UInt32 GetAvailable();
+        System::UInt32 GetUnsettled();
+        void Close();
+        System::String ^ GetName();
+        Session ^ GetSession();
     };
 }}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp Wed Jun  9 11:59:38 2010
@@ -30,10 +30,10 @@
 #include "Sender.h"
 #include "Message.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Sender a managed wrapper for a ::qpid::messaging::Sender 
@@ -79,25 +79,25 @@ namespace messaging {
     }
 
     //
-    // send(msg)
+    // Send(msg)
     //
-    void Sender::send(Message ^ mmsgp)
+    void Sender::Send(Message ^ mmsgp)
     {
-        send(mmsgp, false);
+        Send(mmsgp, false);
     }
 
-    void Sender::send(Message ^ mmsgp, bool sync)
+    void Sender::Send(Message ^ mmsgp, bool sync)
     {
-        senderp->::qpid::messaging::Sender::send(*((*mmsgp).messagep), sync);
+        senderp->::qpid::messaging::Sender::send(*((*mmsgp).NativeMessage), sync);
     }
 
 
-    void Sender::close()
+    void Sender::Close()
     {
         senderp->close();
     }
 
-    Session ^ Sender::getSession()
+    Session ^ Sender::GetSession()
     {
         return parentSession;
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h Wed Jun  9 11:59:38 2010
@@ -34,10 +34,10 @@ namespace messaging {
     class SenderImpl {};
 }}
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Sender is a managed wrapper for a ::qpid::messaging::Sender 
@@ -65,11 +65,11 @@ namespace messaging {
         !Sender();
         Sender(const Sender % rhs);
 
-        // send(message)
-        void send(Message ^ mmsgp);
-        void send(Message ^ mmsgp, bool sync);
+        // Send(message)
+        void Send(Message ^ mmsgp);
+        void Send(Message ^ mmsgp, bool sync);
 
-        void close();
+        void Close();
 
         property System::UInt32 Capacity
         {
@@ -95,6 +95,6 @@ namespace messaging {
             }
         }
 
-        Session ^ getSession();
+        Session ^ GetSession();
     };
 }}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp Wed Jun  9 11:59:38 2010
@@ -35,10 +35,10 @@
 #include "Message.h"
 #include "QpidException.h"
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Session is a managed wrapper for a ::qpid::messaging::Session
@@ -84,110 +84,93 @@ namespace messaging {
         }
     }
 
-    void Session::close()
+    void Session::Close()
     {
         sessionp->close();
     }
 
-    void Session::commit()
+    void Session::Commit()
     {
         sessionp->commit();
     }
 
-    void Session::rollback()
+    void Session::Rollback()
     {
         sessionp->rollback();
     }
 
-    void Session::acknowledge()
+    void Session::Acknowledge()
     {
-        acknowledge(false);
+        Acknowledge(false);
     }
 
-    void Session::acknowledge(bool sync)
+    void Session::Acknowledge(bool sync)
     {
         sessionp->acknowledge(sync);
     }
 
-    void Session::reject(Message ^ message)
+    void Session::Reject(Message ^ message)
     {
-        sessionp->::qpid::messaging::Session::reject(*(message->messagep));
+        sessionp->::qpid::messaging::Session::reject(*(message->NativeMessage));
     }
 
-    void Session::release(Message ^ message)
+    void Session::Release(Message ^ message)
     {
-        sessionp->::qpid::messaging::Session::release(*(message->messagep));
+        sessionp->::qpid::messaging::Session::release(*(message->NativeMessage));
     }
 
-    void Session::sync()
+    void Session::Sync()
     {
-        sync(true);
+        Sync(true);
     }
 
-    void Session::sync(bool block)
+    void Session::Sync(bool block)
     {
         sessionp->sync(block);
     }
 
     // next(receiver)
-    bool Session::nextReceiver(Receiver ^ rcvr)
+    bool Session::NextReceiver(Receiver ^ rcvr)
     {
-        return nextReceiver(rcvr, DurationConstants::FORVER);
+        return NextReceiver(rcvr, DurationConstants::FORVER);
     }
 
-    bool Session::nextReceiver(Receiver ^ rcvr, Duration ^ timeout)
+    bool Session::NextReceiver(Receiver ^ rcvr, Duration ^ timeout)
     {
         System::Exception           ^ newException = nullptr;
 
-        try
-        {
+        try 
+		{
+			// create a duration object
             ::qpid::messaging::Duration dur(timeout->Milliseconds);
 
-            return sessionp->nextReceiver(*(rcvr->receiverp), dur);
+			// wait for the next received message
+            return sessionp->nextReceiver(*(rcvr->NativeReceiver), dur);
         } 
         catch (const ::qpid::types::Exception & error) 
-        {
+		{
             String ^ errmsg = gcnew String(error.what());
-            if (errmsg = "No message to fetch")
-            {
-                // on timeout return null
+            if ("No message to fetch" == errmsg){
                 return false;
             }
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Session::nextReceiver unknown error");
 
-        }
-        finally
-        {
-            // Clean up and throw on caught exceptions
-            if (newException != nullptr)
-            {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
+		if (newException != nullptr) 
+		{
+	        throw newException;
+		}
 
-                throw newException;
-            }
-        }
         return true;
     }
 
     // receiver = next()
-    Receiver ^ Session::nextReceiver()
+    Receiver ^ Session::NextReceiver()
     {
-        return nextReceiver(DurationConstants::FORVER);
+        return NextReceiver(DurationConstants::FORVER);
     }
 
-    Receiver ^ Session::nextReceiver(Duration ^ timeout)
+    Receiver ^ Session::NextReceiver(Duration ^ timeout)
     {
         System::Exception           ^ newException = nullptr;
 
@@ -205,41 +188,23 @@ namespace messaging {
         catch (const ::qpid::types::Exception & error) 
         {
             String ^ errmsg = gcnew String(error.what());
-            if (errmsg = "No message to fetch")
+            if ("No message to fetch" == errmsg)
             {
-                // on timeout return null
                 return nullptr;
             }
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Session::nextReceiver unknown error");
 
-        }
-        finally
-        {
-            // Clean up and throw on caught exceptions
-            if (newException != nullptr)
-            {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
+		if (newException != nullptr) 
+		{
+	        throw newException;
+		}
 
-                throw newException;
-            }
-        }
-        return nullptr;
+		return nullptr;
     }
 
 
-    Sender ^ Session::createSender  (System::String ^ address)
+    Sender ^ Session::CreateSender  (System::String ^ address)
     {
         System::Exception          ^ newException = nullptr;
         ::qpid::messaging::Sender  * senderp         = NULL;
@@ -261,41 +226,39 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Session::createSender unknown error");
-
-        }
         finally
         {
-            // Clean up and throw on caught exceptions
             if (newException != nullptr)
             {
-                if (senderp != NULL)
-                {
-                    delete senderp;
-                }
-
-                throw newException;
+				if (newSender != nullptr)
+				{
+					delete newSender;
+				}
+				else
+				{
+					if (senderp != NULL)
+					{
+						delete senderp;
+					}
+				}
             }
         }
+        if (newException != nullptr) 
+		{
+	        throw newException;
+		}
 
         return newSender;
     }
 
-    Receiver ^ Session::createReceiver(System::String ^ address)
+    Receiver ^ Session::CreateReceiver(System::String ^ address)
     {
         System::Exception           ^ newException = nullptr;
         ::qpid::messaging::Receiver * receiverp    = NULL;
         Receiver                    ^ newReceiver  = nullptr;
 
-        try
-        {
+        try 
+		{
             // allocate a native receiver
             receiverp = new ::qpid::messaging::Receiver;
 
@@ -306,39 +269,37 @@ namespace messaging {
             newReceiver = gcnew Receiver(receiverp, this);
         } 
         catch (const ::qpid::types::Exception & error) 
-        {
+		{
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Session::createReceiver unknown error");
-
-        }
-        finally
-        {
-            // Clean up and throw on caught exceptions
+        finally 
+		{
             if (newException != nullptr)
-            {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
-
-                throw newException;
+			{
+				if (newReceiver != nullptr)
+				{
+					delete newReceiver;
+				}
+				else
+				{
+					if (receiverp != NULL)
+					{
+						delete receiverp;
+					}
+				}
             }
         }
+        if (newException != nullptr) 
+		{
+	        throw newException;
+		}
 
         return newReceiver;
     }
 
 
-    Receiver ^ Session::createReceiver()
+    Receiver ^ Session::CreateReceiver()
     {
         System::Exception           ^ newException = nullptr;
         ::qpid::messaging::Receiver * receiverp    = NULL;
@@ -357,35 +318,33 @@ namespace messaging {
             String ^ errmsg = gcnew String(error.what());
             newException    = gcnew QpidException(errmsg);
         }
-        catch (const std::exception & error) 
-        {
-            String ^ errmsg = gcnew String(error.what());
-            newException    = gcnew QpidException(errmsg);
-        } 
-        catch ( ... )
-        {
-            newException = gcnew QpidException("Session::createReceiver unknown error");
-
-        }
-        finally
-        {
-            // Clean up and throw on caught exceptions
+        finally 
+		{
             if (newException != nullptr)
-            {
-                if (sessionp != NULL)
-                {
-                    delete sessionp;
-                }
-
-                throw newException;
+			{
+				if (newReceiver != nullptr)
+				{
+					delete newReceiver;
+				}
+				else
+				{
+					if (receiverp != NULL)
+					{
+						delete receiverp;
+					}
+				}
             }
         }
+        if (newException != nullptr) 
+		{
+	        throw newException;
+		}
 
         return newReceiver;
     }
 
 
-    Sender ^ Session::getSender(System::String ^ name)
+    Sender ^ Session::GetSender(System::String ^ name)
     {
         ::qpid::messaging::Sender * sender = new ::qpid::messaging::Sender;
 
@@ -398,7 +357,7 @@ namespace messaging {
 
 
 
-    Receiver ^ Session::getReceiver(System::String ^ name)
+    Receiver ^ Session::GetReceiver(System::String ^ name)
     {
         ::qpid::messaging::Receiver * receiver = new ::qpid::messaging::Receiver;
 
@@ -411,12 +370,12 @@ namespace messaging {
 
 
 
-    Connection ^ Session::getConnection()
+    Connection ^ Session::GetConnection()
     {
         return parentConnectionp;
     }
 
-    void Session::checkError()
+    void Session::CheckError()
     {
         sessionp->checkError();
     }

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h?rev=952968&r1=952967&r2=952968&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h Wed Jun  9 11:59:38 2010
@@ -36,10 +36,10 @@ namespace messaging {
     class SessionImpl {};
 }}
 
-namespace org {
-namespace apache {
-namespace qpid {
-namespace messaging {
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
 
     /// <summary>
     /// Session is a managed wrapper for a ::qpid::messaging::Session
@@ -70,15 +70,15 @@ namespace messaging {
         !Session();
         Session(const Session % rhs);
 
-        void close();
-        void commit();
-        void rollback();
-        void acknowledge();
-        void acknowledge(bool sync);
-        void reject(Message ^);
-        void release(Message ^);
-        void sync();
-        void sync(bool block);
+        void Close();
+        void Commit();
+        void Rollback();
+        void Acknowledge();
+        void Acknowledge(bool sync);
+        void Reject(Message ^);
+        void Release(Message ^);
+        void Sync();
+        void Sync(bool block);
 
         property System::UInt32 Receivable
         {
@@ -91,28 +91,28 @@ namespace messaging {
         }
 
         // next(receiver)
-        bool nextReceiver(Receiver ^);
-        bool nextReceiver(Receiver ^, Duration ^ timeout);
+        bool NextReceiver(Receiver ^ rcvr);
+        bool NextReceiver(Receiver ^ rcvr, Duration ^ timeout);
 
         // receiver = next()
-        Receiver ^ nextReceiver();
-        Receiver ^ nextReceiver(Duration ^ timeout);
+        Receiver ^ NextReceiver();
+        Receiver ^ NextReceiver(Duration ^ timeout);
 
 
-        Sender   ^ createSender  (System::String ^ address);
-        Receiver ^ createReceiver(System::String ^ address);
-        Receiver ^ createReceiver();
+        Sender   ^ CreateSender  (System::String ^ address);
+        Receiver ^ CreateReceiver(System::String ^ address);
+        Receiver ^ CreateReceiver();
 
-        Sender   ^ getSender(System::String ^ name);
-        Receiver ^ getReceiver(System::String ^ name);
+        Sender   ^ GetSender(System::String ^ name);
+        Receiver ^ GetReceiver(System::String ^ name);
 
-        Connection ^ getConnection();
+        Connection ^ GetConnection();
 
         property System::Boolean HasError
         {
             System::Boolean get () { return sessionp->hasError(); }
         }
 
-        void checkError();
+        void CheckError();
     };
 }}}}



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org