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/05/28 20:09:12 UTC

svn commit: r949245 [2/3] - 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.receiver/Properties/ examples/csharp.map.ca...

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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp Fri May 28 18:09:10 2010
@@ -29,7 +29,12 @@
 #include "qpid/types/Variant.h"
 
 #include "QpidMarshal.h"
+#include "Address.h"
+#include "Duration.h"
 #include "Message.h"
+#include "QpidTypeCheck.h"
+#include "QpidException.h"
+#include "TypeTranslator.h"
 
 namespace org {
 namespace apache {
@@ -40,38 +45,26 @@ namespace messaging {
     /// Message is a managed wrapper for a ::qpid::messaging::Message
     /// </summary>
 
-    // This constructor is used to create a message from bytes to put into the message
-    Message::Message(System::String ^ bytes) :
-        aVMap(gcnew VMap()),
-        aVList(gcnew VList()),
-        pVMapType(aVMap.GetType()),
-        pVListType(aVList.GetType()),
-        messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative(bytes)))
+    // Create empty message
+    Message::Message() :
+        messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative("")))
     {
     }
 
-    // This constructor creates a message from a native received message
-    Message::Message(::qpid::messaging::Message * msgp) :
-        aVMap(gcnew VMap()),
-        aVList(gcnew VList()),
-        pVMapType(aVMap.GetType()),
-        pVListType(aVList.GetType()),
-        messagep(msgp)
+    // Create from string
+    Message::Message(System::String ^ string) :
+        messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative(string)))
     {
     }
 
-
+    // Create from object
     Message::Message(System::Object ^ objp) :
-        aVMap(gcnew VMap()),
-        aVList(gcnew VList()),
-        pVMapType(aVMap.GetType()),
-        pVListType(aVList.GetType()),
         messagep(new ::qpid::messaging::Message(QpidMarshal::ToNative("")))
     {
         ::qpid::types::Variant * variantp  = 0;
         std::string            * variantsp = 0;
 
-        if (objIsMap(objp))
+        if (QpidTypeCheck::ObjectIsMap(objp))
         {
             // Create a mapped message using given dictionary
 
@@ -79,7 +72,7 @@ namespace messaging {
             ::qpid::types::Variant::Map newMap;
 
             // Add the map variables to the map
-            Encode(newMap, (VMap ^)objp);
+            TypeTranslator::ManagedToNative(newMap, (QpidMap ^)objp);
 
             // Set message content type
             messagep->setContentType("ampq/map");
@@ -87,7 +80,7 @@ namespace messaging {
             // Insert the map into the message
             ::qpid::messaging::encode(newMap, *messagep, QpidMarshal::ToNative("amqp/map"));
         }
-        else if (objIsList(objp))
+        else if (QpidTypeCheck::ObjectIsList(objp))
         {
             // Create a list message using given list
 
@@ -95,7 +88,7 @@ namespace messaging {
             ::qpid::types::Variant::List newList;
 
             // Add the list variables to the list
-            Encode(newList, (VList ^)objp);
+            TypeTranslator::ManagedToNative(newList, (QpidList ^)objp);
 
             // Set message content type
             messagep->setContentType("ampq/list");
@@ -110,6 +103,12 @@ namespace messaging {
         }
     }
 
+    // Create from received message
+    Message::Message(::qpid::messaging::Message * msgp) :
+        messagep(msgp)
+    {
+    }
+
 
     // Destructor
     Message::~Message()
@@ -125,6 +124,7 @@ namespace messaging {
     }
 
     // Copy constructor
+    // TODO: prevent copy
     Message::Message(const Message % rhs)
     {
         messagep      = rhs.messagep;
@@ -143,209 +143,25 @@ namespace messaging {
 
 
     //
-    // The given object is a Dictionary.
-    // Add its elements to the qpid map.
+    // ReplyTo
     //
-    void Message::Encode(::qpid::types::Variant::Map & theMapp,
-                         VMap ^ theObjp)
+    void Message::setReplyTo(Address ^ address)
     {
-        // iterate the items, converting each to a variant and adding to the map
-        for each (System::Collections::Generic::KeyValuePair<System::String^, System::Object^> kvp in theObjp)
-        {
-            if (objIsMap(kvp.Value))
-            {
-                // Recurse on inner map
-                // Allocate a map
-                ::qpid::types::Variant::Map newMap;
-
-                // Add the map variables to the map
-                Encode(newMap, (VMap ^)kvp.Value);
-
-                // Create a variant entry for the inner map
-                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
-
-                // Get map's name
-                std::string entryName = QpidMarshal::ToNative(kvp.Key);
-
-                // Add inner map to outer map
-                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, *newVariantp));
-            }
-            else if (objIsList(kvp.Value))
-            {
-                // Recurse on inner list
-                // Allocate a list
-                ::qpid::types::Variant::List newList;
-
-                // Add the List variables to the list
-                Encode(newList, (VList ^)kvp.Value);
-
-                // Create a variant entry for the inner map
-                ::qpid::types::Variant::List newVariant(newList);
-
-                //std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
-
-                // Get list's name
-                std::string entryName = QpidMarshal::ToNative(kvp.Key);
-
-                // Add inner list to outer map
-                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, newVariant));
-            }
-            else
-            {
-                // Add a simple native type to map
-                ::qpid::types::Variant entryValue;
-                EncodeObject(kvp.Value, entryValue);
-                std::string entryName = QpidMarshal::ToNative(kvp.Key);
-                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, entryValue));
-            }
-        }
+        messagep->setReplyTo(*(address->addressp));
     }
 
-
-
-    //
-    // The given object is a List.
-    // Add its elements to the qpid list.
-    //
-    void Message::Encode(::qpid::types::Variant::List & theListp,
-                         VList ^ theObjp)
+    Address ^ Message::getReplyTo()
     {
-        // iterate the items, converting each to a variant and adding to the map
-        for each (System::Object ^ listObj in theObjp)
-        {
-            if (objIsMap(listObj))
-            {
-                // Recurse on inner map
-                // Allocate a map
-                ::qpid::types::Variant::Map newMap;
-
-                // Add the map variables to the map
-                Encode(newMap, (VMap ^)listObj);
-
-                // Create a variant entry for the inner map
-                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
-
-                // Add inner map to outer list
-                theListp.push_back(*newVariantp);
-            }
-            else if (objIsList(listObj))
-            {
-                // Recurse on inner list
-                // Allocate a list
-                ::qpid::types::Variant::List newList;
-
-                // Add the List variables to the list
-                Encode(newList, (VList ^)listObj);
-
-                // Create a variant entry for the inner list
-                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
-
-                // Add inner list to outer list
-                theListp.push_back(*newVariantp);
-            }
-            else
-            {
-                // Add a simple native type to list
-                ::qpid::types::Variant entryValue;
-                EncodeObject(listObj, entryValue);
-                theListp.push_back(entryValue);
-            }
-        }
-    }
+        const ::qpid::messaging::Address & addrp =
+            messagep->::qpid::messaging::Message::getReplyTo();
 
+        return gcnew Address(const_cast<::qpid::messaging::Address *>(&addrp));
+    }
 
 
     //
-    // Returns a variant representing simple native type object.
-    // Not to be called for Map/List objects.
+    // Subject
     //
-    void Message::EncodeObject(System::Object ^ theObjp, 
-                               ::qpid::types::Variant & targetp)
-    {
-        System::Type     ^ typeP    = (*theObjp).GetType();
-        System::TypeCode   typeCode = System::Type::GetTypeCode( typeP );
-
-        switch (typeCode)
-        {
-        case System::TypeCode::Boolean :
-            targetp = System::Convert::ToBoolean(theObjp);
-            break;
-
-        case System::TypeCode::Byte :
-            targetp = System::Convert::ToByte(theObjp);
-            break;
-
-        case System::TypeCode::UInt16 :
-            targetp = System::Convert::ToUInt16(theObjp);
-            break;
-
-        case System::TypeCode::UInt32 :
-            targetp = System::Convert::ToUInt32(theObjp);
-            break;
-
-        case System::TypeCode::UInt64 :
-            targetp = System::Convert::ToUInt64(theObjp);
-            break;
-
-        case System::TypeCode::Char :
-        case System::TypeCode::SByte :
-            targetp = System::Convert::ToSByte(theObjp);
-            break;
-
-        case System::TypeCode::Int16 :
-            targetp = System::Convert::ToInt16(theObjp);
-            break;
-
-        case System::TypeCode::Int32 :
-            targetp = System::Convert::ToInt32(theObjp);
-            break;
-
-        case System::TypeCode::Int64 :
-            targetp = System::Convert::ToInt64(theObjp);
-            break;
-
-        case System::TypeCode::Single :
-            targetp = System::Convert::ToSingle(theObjp);
-            break;
-
-        case System::TypeCode::Double :
-            targetp = System::Convert::ToDouble(theObjp);
-            break;
-
-        case System::TypeCode::String :
-            {
-                std::string      rString;
-                System::String ^ rpString;
-
-                rpString = System::Convert::ToString(theObjp);
-                rString = QpidMarshal::ToNative(rpString);
-                targetp = rString;
-				targetp.setEncoding(QpidMarshal::ToNative("utf8"));
-            }
-            break;
-
-            
-        default:
-
-            throw gcnew System::NotImplementedException();
-
-        }
-    }
-
-
-    // Properties...
-
-    //void Message::setReplyTo(System::String ^ address)
-    //{
-    //    messagep->setReplyTo(QpidMarshal::ToNative(address));
-    //}
-
-    //System::String ^ Message::getReplyTo()
-    //{
-    //    return gcnew String(messagep->getReplyTo().c_str());
-    //}
-
-
     void Message::setSubject(System::String ^ subject)
     {
         messagep->setSubject(QpidMarshal::ToNative(subject));
@@ -357,6 +173,9 @@ namespace messaging {
     }
     
 
+    //
+    // ContentType
+    //
     void Message::setContentType(System::String ^ ct)
     {
         messagep->setContentType(QpidMarshal::ToNative(ct));
@@ -368,6 +187,9 @@ namespace messaging {
     }
     
     
+    //
+    // MessageId
+    //
     void Message::setMessageId(System::String ^ mId)
     {
         messagep->setMessageId(QpidMarshal::ToNative(mId));
@@ -379,6 +201,9 @@ namespace messaging {
     }
     
     
+    //
+    // UserId
+    //
     void Message::setUserId(System::String ^ uId)
     {
         messagep->setUserId(QpidMarshal::ToNative(uId));
@@ -390,6 +215,9 @@ namespace messaging {
     }
     
     
+    //
+    // CorrelationId
+    //
     void Message::setCorrelationId(System::String ^ cId)
     {
         messagep->setCorrelationId(QpidMarshal::ToNative(cId));
@@ -401,6 +229,9 @@ namespace messaging {
     }
     
 
+    //
+    // Priority
+    //
     void Message::setPriority(unsigned char priority)
     {
         messagep->setPriority(priority);
@@ -412,8 +243,22 @@ namespace messaging {
     }
     
 
-    //void setTtl(Duration ttl);
-    //Duration getTtl();
+    //
+    // Ttl
+    //
+    void Message::setTtl(Duration ^ ttl)
+    {
+        ::qpid::messaging::Duration dur(ttl->Milliseconds);
+
+        messagep->setTtl(dur);
+    }
+    
+    Duration ^ Message::getTtl()
+    {
+        Duration ^ dur = gcnew Duration(messagep->getTtl().getMilliseconds());
+
+        return dur;
+    }
 
     void Message::setDurable(bool durable)
     {
@@ -437,11 +282,22 @@ namespace messaging {
     }
 
 
-    //System::String ^ Message::getProperties()
-    //{
-    //    pqid::types::Variant::Map * mapp = new
-    //    return gcnew String(messagep->getReplyTo().c_str());
-    //}
+    System::Collections::Generic::Dictionary<
+            System::String^, System::Object^> ^ Message::getProperties()
+    {
+        ::qpid::types::Variant::Map map;
+
+        map = messagep->getProperties();
+
+        System::Collections::Generic::Dictionary<
+            System::String^, System::Object^> ^ dict =
+            gcnew System::Collections::Generic::Dictionary<
+                      System::String^, System::Object^> ;
+
+        TypeTranslator::NativeToManaged(dict, map);
+
+        return dict;
+    }
 
 
     void Message::setContent(System::String ^ content)
@@ -468,100 +324,7 @@ namespace messaging {
         
         ::qpid::messaging::decode(*messagep, map, QpidMarshal::ToNative("amqp/map"));
 
-        Decode(dict, map);
-    }
-
-
-    // Given a user Dictionary and a qpid map,
-    //   extract the qpid elements and put them into the dictionary.
-    //
-    void Message::Decode(VMap ^ dict, ::qpid::types::Variant::Map & map)
-    {
-        // For each object in the message map, 
-        //  create a .NET object and add it to the dictionary.
-        for (::qpid::types::Variant::Map::const_iterator i = map.begin(); i != map.end(); ++i) {
-            // Get the name
-            System::String ^ elementName = gcnew String(i->first.c_str());
-
-            ::qpid::types::Variant     variant = i->second;
-            ::qpid::types::VariantType vType   = variant.getType();
-
-            switch (vType)
-            {
-            case ::qpid::types::VAR_BOOL:
-                dict[elementName] = variant.asBool();
-                break;
-                
-            case ::qpid::types::VAR_UINT8:
-                dict[elementName] = variant.asUint8();
-                break;
-                
-            case ::qpid::types::VAR_UINT16:
-                dict[elementName] = variant.asUint16();
-                break;
-                
-            case ::qpid::types::VAR_UINT32:
-                dict[elementName] = variant.asUint32();
-                break;
-                
-            case ::qpid::types::VAR_UINT64:
-                dict[elementName] = variant.asUint64();
-                break;
-                
-            case ::qpid::types::VAR_INT8:
-                dict[elementName] = variant.asInt8();
-                break;
-                
-            case ::qpid::types::VAR_INT16:
-                dict[elementName] = variant.asInt16();
-                break;
-                
-            case ::qpid::types::VAR_INT32:
-                dict[elementName] = variant.asInt32();
-                break;
-                
-            case ::qpid::types::VAR_INT64:
-                dict[elementName] = variant.asInt64();
-                break;
-                
-            case ::qpid::types::VAR_FLOAT:
-                dict[elementName] = variant.asFloat();
-                break;
-                
-            case ::qpid::types::VAR_DOUBLE:
-                dict[elementName] = variant.asDouble();
-                break;
-                
-            case ::qpid::types::VAR_STRING:
-                {
-                    System::String ^ elementValue = gcnew System::String(variant.asString().c_str());
-                    dict[elementName] = elementValue;
-                    break;
-                }
-            case ::qpid::types::VAR_MAP:
-                {
-                    VMap ^ newDict = gcnew VMap();
-
-                    Decode (newDict, variant.asMap());
-
-                    dict[elementName] = newDict;
-                    break;
-                }
-
-            case ::qpid::types::VAR_LIST:
-                {
-                    VList ^ newList = gcnew VList();
-
-                    Decode (newList, variant.asList());
-
-                    dict[elementName] = newList;
-                    break;
-                }
-                
-            case ::qpid::types::VAR_UUID:
-                break;
-            }
-        }
+        TypeTranslator::NativeToManaged(dict, map);
     }
 
 
@@ -571,99 +334,43 @@ namespace messaging {
     void Message::getContent(System::Collections::Generic::List<
                         System::Object^> ^ list)
     {
-        // Extract the message map from the message
-        ::qpid::types::Variant::List vList;
+        // allocate a native messaging::List
+        ::qpid::types::Variant::List nativeList;
         
-        ::qpid::messaging::decode(*messagep, vList, QpidMarshal::ToNative("amqp/list"));
+        // Extract the list from the message in native format
+        ::qpid::messaging::decode(*messagep, nativeList, QpidMarshal::ToNative("amqp/list"));
 
-        Decode(list, vList);
+        // translate native list into user's managed list
+        TypeTranslator::NativeToManaged(list, nativeList);
     }
 
-
-    void Message::Decode(VList ^ vList, ::qpid::types::Variant::List & qpidList)
+    //
+    // User wants content as bytes.
+    // result array must be correct size already
+    //
+    void Message::getRaw(array<System::Byte> ^ arr)
     {
-        // For each object in the message map, 
-        //  create a .NET object and add it to the dictionary.
-        for (::qpid::types::Variant::List::const_iterator i = qpidList.begin(); i != qpidList.end(); ++i) 
-        {
-            ::qpid::types::Variant     variant = *i;
-            ::qpid::types::VariantType vType   = variant.getType();
+        System::UInt32 size = messagep->getContentSize();
+     
+        if (0 == size)
+            throw gcnew QpidException("Message::getRaw - message size is zero");
+
+        if (arr->Length != size)
+            throw gcnew QpidException("Message::getRaw - receive buffer is too small");
+
+        const char * ptr = messagep->getContentPtr();
 
-            switch (vType)
-            {
-            case ::qpid::types::VAR_BOOL:
-                (*vList).Add(variant.asBool());
-                break;
-                
-            case ::qpid::types::VAR_UINT8:
-                (*vList).Add(variant.asUint8());
-                break;
-                
-            case ::qpid::types::VAR_UINT16:
-                (*vList).Add(variant.asUint16());
-                break;
-                
-            case ::qpid::types::VAR_UINT32:
-                (*vList).Add(variant.asUint32());
-                break;
-                
-            case ::qpid::types::VAR_UINT64:
-                (*vList).Add(variant.asUint64());
-                break;
-                
-            case ::qpid::types::VAR_INT8:
-                (*vList).Add(variant.asInt8());
-                break;
-                
-            case ::qpid::types::VAR_INT16:
-                (*vList).Add(variant.asInt16());
-                break;
-                
-            case ::qpid::types::VAR_INT32:
-                (*vList).Add(variant.asInt32());
-                break;
-                
-            case ::qpid::types::VAR_INT64:
-                (*vList).Add(variant.asInt64());
-                break;
-                
-            case ::qpid::types::VAR_FLOAT:
-                (*vList).Add(variant.asFloat());
-                break;
-                
-            case ::qpid::types::VAR_DOUBLE:
-                (*vList).Add(variant.asDouble());
-                break;
-                
-            case ::qpid::types::VAR_STRING:
-                {
-                    System::String ^ elementValue = gcnew System::String(variant.asString().c_str());
-                    (*vList).Add(elementValue);
-                    break;
-                }
-            case ::qpid::types::VAR_MAP:
-                {
-                    VMap ^ newDict = gcnew VMap();
-
-                    Decode (newDict, variant.asMap());
-
-                    (*vList).Add(newDict);
-                    break;
-                }
-
-            case ::qpid::types::VAR_LIST:
-                {
-                    VList ^ newList = gcnew VList();
-
-                    Decode (newList, variant.asList());
-
-                    (*vList).Add(newList);
-                    break;
-                }
-                
-            case ::qpid::types::VAR_UUID:
-                break;
-            }
+        // TODO: System::Runtime::InteropServices::Marshal::Copy(ptr, arr, 0, size);
+
+        for (UInt32 i = 0; i < size; i++)
+        {
+            arr[i] = ptr[i];
         }
     }
+
+
+    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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Message.h Fri May 28 18:09:10 2010
@@ -31,14 +31,8 @@ namespace apache {
 namespace qpid {
 namespace messaging {
 
-typedef System::Collections::Generic::Dictionary<
-            System::String^, 
-            System::Object^> 
-                VMap;
-
-typedef System::Collections::Generic::List<
-            System::Object^> 
-                VList;
+    ref class Address;
+    ref class Duration;
 
     /// <summary>
     /// Message is a managed wrapper for a ::qpid::messaging::Message
@@ -51,51 +45,20 @@ typedef System::Collections::Generic::Li
         // Kept object deletion code
         void Cleanup();
 
-        bool objIsMap (System::Object ^ op)
-        { 
-            return (*op).GetType() == pVMapType;
-        }
-
-        bool objIsList(System::Object ^ op)
-        { 
-            return (*op).GetType() == pVListType;
-        }
-
-        // The given object is a Dictionary.
-        // Add its elements to the qpid map.
-        void Encode(::qpid::types::Variant::Map & theMapp,
-                    VMap ^ theObjp);
-
-        // The given object is a List.
-        // Add its elements to the qpid list.
-        void Encode(::qpid::types::Variant::List & theListp,
-                    VList ^ theObjp);
-
-        // Returns a variant representing simple native type object.
-        // Not to be called for Map/List objects.
-        void EncodeObject(System::Object ^ theObjp,
-                          ::qpid::types::Variant & targetp);
-
-
-        void Decode(VMap ^ dict, ::qpid::types::Variant::Map & map);
-
-        void Decode(VList ^ vList, ::qpid::types::Variant::List & qpidList);
-
-
-        // map and list for type comparison
-        VMap  aVMap;
-        VList aVList;
-        System::Type ^ pVMapType;
-        System::Type ^ pVListType;
-
     public:
+        // Create empty message
+        Message();
+
         // Create from String
-        Message(System::String ^ bytes);
+        Message(System::String ^ string);
 
         // Create from object
         Message(System::Object ^ obj);
 
-        // Create reference copy
+        // TODO: Create from bytes
+        // Message(System::Byte [] ^ bytes);
+
+        // Create from received message
         Message(::qpid::messaging::Message * msgp);
 
         ~Message();
@@ -107,8 +70,8 @@ typedef System::Collections::Generic::Li
         // The kept object in the Messaging C++ DLL
         ::qpid::messaging::Message * messagep;
 
-        //void setReplyTo(System::String ^ address);
-        //System::String ^ getReplyTo();
+        void setReplyTo(Address ^ address);
+        Address ^ getReplyTo();
 
         void setSubject(System::String ^ subject);
         System::String ^ getSubject();
@@ -128,8 +91,8 @@ typedef System::Collections::Generic::Li
         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();
@@ -137,17 +100,32 @@ typedef System::Collections::Generic::Li
         bool getRedelivered();
         void setRedelivered(bool redelivered);
 
-        //System::String ^ getProperties();
+        System::Collections::Generic::Dictionary<
+            System::String^, System::Object^> ^ getProperties();
 
         void setContent(System::String ^ content);
 
+        //TODO:: void setContent(Bytes{} bytes, offset, length);
+
+        // get content as string
         System::String ^ getContent();
 
+        // get content as dictionary
         void getContent(System::Collections::Generic::Dictionary<
                             System::String^, 
                             System::Object^> ^ dict);
 
+        // get content as map
         void getContent(System::Collections::Generic::List<
                             System::Object^> ^);
+
+        // get content as bytes
+        void getRaw(cli::array<System::Byte> ^ arr);
+
+        System::UInt64 getContentSize();
+
+        //TODO: EncodingException
+
+        // Note: encode/decode functions are in TypeTranslator
     };
 }}}}

Added: 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=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h Fri May 28 18:09:10 2010
@@ -0,0 +1,38 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+namespace org {
+namespace apache {
+namespace qpid {
+namespace messaging {
+
+using namespace System;
+
+public ref class QpidException : System::Exception
+{
+ public:
+
+ 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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h Fri May 28 18:09:10 2010
@@ -37,6 +37,7 @@ public:
 
     /// <summary>
     /// Convert managed String into native UTF8-encoded string
+    /// TODO: figure out some encoding other that UTF-8
     /// </summary>
 
     static std::string ToNative (System::String^ managed) 

Added: 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=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h Fri May 28 18:09:10 2010
@@ -0,0 +1,75 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+namespace org {
+namespace apache {
+namespace qpid {
+namespace messaging {
+
+    /// <summary>
+    /// QpidTypeCheck determines if a given managed object represents
+    /// a qpid type per the scheme presented by the messaging DLL.
+    ///
+    // The supported mapping is:
+    /// * a managed Dictionary and a Qpid Messaging Map
+    /// * a managed List       and a Qpid Messaging List
+    /// </summary>
+
+    typedef System::Collections::Generic::Dictionary<
+                System::String^, 
+                System::Object^> 
+                    QpidMap;
+
+    typedef System::Collections::Generic::List<
+                System::Object^> 
+                    QpidList;
+
+    private ref class 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]");
+    };
+
+
+    public ref class QpidTypeCheck
+    {
+
+    public:
+
+        static bool ObjectIsMap (System::Object ^ object)
+        { 
+            return (*object).GetType() == QpidTypeCheckConstants::mapTypeP;
+        }
+
+        static bool ObjectIsList(System::Object ^ object)
+        { 
+            return (*object).GetType() == QpidTypeCheckConstants::listTypeP;
+        }
+    };
+}}}}

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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp Fri May 28 18:09:10 2010
@@ -26,11 +26,13 @@
 #include "qpid/messaging/Receiver.h"
 #include "qpid/messaging/Session.h"
 #include "qpid/messaging/Message.h"
+#include "qpid/messaging/exceptions.h"
 
 #include "Receiver.h"
 #include "Session.h"
 #include "Message.h"
 #include "Duration.h"
+#include "QpidException.h"
 
 namespace org {
 namespace apache {
@@ -82,56 +84,163 @@ namespace messaging {
         }
     }
 
+    //
+    // get(message)
+    //
     bool Receiver::get(Message ^ mmsgp)
     {
-        return receiverp->Receiver::get(*((*mmsgp).messagep));
+        return get(mmsgp, DurationConstants::FORVER);
     }
 
     bool Receiver::get(Message ^ mmsgp, Duration ^ durationp)
     {
-        return receiverp->Receiver::get(*((*mmsgp).messagep),
-                                        *((*durationp).durationp));
+        ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+        return receiverp->Receiver::get(*(mmsgp->messagep), dur);
     }
 
+    //
+    // message = get()
+    //
+    Message ^ Receiver::get()
+    {
+        return get(DurationConstants::FORVER);
+    }
+
+
     Message ^ Receiver::get(Duration ^ durationp)
     {
-        // allocate a message
-        ::qpid::messaging::Message * msgp = new ::qpid::messaging::Message;
+        System::Exception          ^ newException = nullptr;
+        ::qpid::messaging::Message * msgp         = NULL;
+        Message                    ^ newMessage   = nullptr;
 
-        // get the message
-        *msgp = receiverp->::qpid::messaging::Receiver::get(*((*durationp).durationp));
+        try
+        {
+            // allocate a message
+            msgp = new ::qpid::messaging::Message;
+
+            // translate the duration
+            ::qpid::messaging::Duration dur((*durationp).Milliseconds);
 
-        // create new managed message with received message embedded in it
-        Message ^ newMessage = gcnew Message(msgp);
+            // get the message
+            *msgp = receiverp->::qpid::messaging::Receiver::get(dur);
+
+            // create new managed message with received message embedded in it
+            newMessage = gcnew Message(msgp);
+        } 
+        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("Receiver:get unknown error");
+        }
+        finally
+        {
+            // Clean up and throw on caught exceptions
+            if (newException != nullptr)
+            {
+                if (msgp != NULL)
+                {
+                    delete msgp;
+                }
+
+                throw newException;
+            }
+        }
 
         return newMessage;
     }
 
+    //
+    // fetch(message)
+    //
     bool Receiver::fetch(Message ^ mmsgp)
     {
-        return receiverp->::qpid::messaging::Receiver::fetch(*((*mmsgp).messagep));
+        return fetch(mmsgp, DurationConstants::FORVER);
     }
 
     bool Receiver::fetch(Message ^ mmsgp, Duration ^ durationp)
     {
-        return receiverp->::qpid::messaging::Receiver::fetch(*((*mmsgp).messagep),
-                                          *((*durationp).durationp));
+        ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+        return receiverp->::qpid::messaging::Receiver::fetch(*((*mmsgp).messagep), dur);
     }
     
+
+    //
+    // message = fetch()
+    //
+
+    Message ^ Receiver::fetch()
+    {
+        return fetch(DurationConstants::FORVER);
+    }
+
     Message ^ Receiver::fetch(Duration ^ durationp)
     {
-        // allocate a message
-        ::qpid::messaging::Message * msgp = new ::qpid::messaging::Message;
+        System::Exception          ^ newException = nullptr;
+        ::qpid::messaging::Message * msgp         = NULL;
+         Message                   ^ newMessage   = nullptr;
+
+        try
+        {
+            // allocate a message
+            ::qpid::messaging::Message * msgp = new ::qpid::messaging::Message;
+
+            // translate the duration
+            ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+            // get the message
+            *msgp = receiverp->::qpid::messaging::Receiver::fetch(dur);
+
+            // create new managed message with received message embedded in it
+            newMessage = gcnew Message(msgp);
+        } 
+        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("Receiver:fetch unknown error");
 
-        // get the message
-        *msgp = receiverp->::qpid::messaging::Receiver::fetch(*((*durationp).durationp));
+        }
+        finally
+        {
+            // Clean up and throw on caught exceptions
+            if (newException != nullptr)
+            {
+                if (msgp != NULL)
+                {
+                    delete msgp;
+                }
 
-        // create new managed message with received message embedded in it
-        Message ^ newMessage = gcnew Message(msgp);
+                throw newException;
+            }
+        }
 
         return newMessage;
     }
 
+    void Receiver::setCapacity(System::UInt32 capacity)
+    {
+        receiverp->setCapacity(capacity);
+    }
+
     System::UInt32 Receiver::getCapacity()
     {
         return receiverp->getCapacity();

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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h Fri May 28 18:09:10 2010
@@ -51,33 +51,39 @@ namespace messaging {
     public ref class Receiver
     {
     private:
-        // The kept object in the Messaging C++ DLL
-        ::qpid::messaging::Receiver * receiverp;
-
         // The session that created this Receiver
         Session ^ parentSession;
 
-        // Kept object lifetime flag
-        bool disposed;
-
         // Kept object deletion code
         void Cleanup();
 
     public:
+        // The kept object in the Messaging C++ DLL
+        ::qpid::messaging::Receiver * receiverp;
+
         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 ^ durationp);
+        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();

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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp Fri May 28 18:09:10 2010
@@ -28,7 +28,6 @@
 #include "qpid/messaging/Message.h"
 
 #include "Sender.h"
-#include "Session.h"
 #include "Message.h"
 
 namespace org {
@@ -79,9 +78,12 @@ namespace messaging {
         }
     }
 
+    //
+    // send(msg)
+    //
     void Sender::send(Message ^ mmsgp)
     {
-        senderp->::qpid::messaging::Sender::send(*((*mmsgp).messagep));
+        send(mmsgp, false);
     }
 
     void Sender::send(Message ^ mmsgp, bool sync)
@@ -89,29 +91,10 @@ namespace messaging {
         senderp->::qpid::messaging::Sender::send(*((*mmsgp).messagep), sync);
     }
 
-    void Sender::setCapacity(System::UInt32 capacity)
-    {
-        senderp->setCapacity(capacity);
-    }
-
-    System::UInt32 Sender::getCapacity()
-    {
-        return senderp->getCapacity();
-    }
-
-    System::UInt32 Sender::getUnsettled()
-    {
-        return senderp->getUnsettled();
-    }
-
-    System::UInt32 Sender::getAvailable()
-    {
-        return senderp->getAvailable();
-    }
 
-    System::String ^ Sender::getName()
+    void Sender::close()
     {
-        return gcnew System::String(senderp->getName().c_str());
+        senderp->close();
     }
 
     Session ^ Sender::getSession()

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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Sender.h Fri May 28 18:09:10 2010
@@ -65,13 +65,36 @@ namespace messaging {
         !Sender();
         Sender(const Sender % rhs);
 
+        // send(message)
         void send(Message ^ mmsgp);
         void send(Message ^ mmsgp, bool sync);
-        void setCapacity(System::UInt32 capacity);
-        System::UInt32 getCapacity();
-        System::UInt32 getUnsettled();
-        System::UInt32 getAvailable();
-        System::String ^ getName();
+
+        void close();
+
+        property System::UInt32 Capacity
+        {
+            System::UInt32 get () { return senderp->getCapacity(); }
+            void set (System::UInt32 capacity) { senderp->setCapacity(capacity); }
+        }
+
+        property System::UInt32 Unsettled
+        {
+            System::UInt32 get () { return senderp->getUnsettled(); }
+        }
+
+        property System::UInt32 Available
+        {
+            System::UInt32 get () { return senderp->getAvailable(); }
+        }
+
+        property System::String ^ Name
+        {
+            System::String ^ get ()
+            {
+                return gcnew System::String(senderp->getName().c_str());
+            }
+        }
+
         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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp Fri May 28 18:09:10 2010
@@ -24,6 +24,7 @@
 #include <limits>
 
 #include "qpid/messaging/Session.h"
+#include "qpid/messaging/exceptions.h"
 
 #include "QpidMarshal.h"
 #include "Session.h"
@@ -31,6 +32,8 @@
 #include "Duration.h"
 #include "Receiver.h"
 #include "Sender.h"
+#include "Message.h"
+#include "QpidException.h"
 
 namespace org {
 namespace apache {
@@ -65,7 +68,7 @@ namespace messaging {
     // copy constructor
     Session::Session(const Session % rhs)
     {
-        sessionp          = rhs.sessionp;
+        sessionp = rhs.sessionp;
         parentConnectionp = rhs.parentConnectionp;
     }
 
@@ -98,7 +101,7 @@ namespace messaging {
 
     void Session::acknowledge()
     {
-        sessionp->acknowledge();
+        acknowledge(false);
     }
 
     void Session::acknowledge(bool sync)
@@ -106,9 +109,19 @@ namespace messaging {
         sessionp->acknowledge(sync);
     }
 
+    void Session::reject(Message ^ message)
+    {
+        sessionp->::qpid::messaging::Session::reject(*(message->messagep));
+    }
+
+    void Session::release(Message ^ message)
+    {
+        sessionp->::qpid::messaging::Session::release(*(message->messagep));
+    }
+
     void Session::sync()
     {
-        sessionp->sync();
+        sync(true);
     }
 
     void Session::sync(bool block)
@@ -116,67 +129,291 @@ namespace messaging {
         sessionp->sync(block);
     }
 
-    System::UInt32 Session::getReceivable()
+    // next(receiver)
+    bool Session::nextReceiver(Receiver ^ rcvr)
     {
-        return sessionp->getReceivable();
+        return nextReceiver(rcvr, DurationConstants::FORVER);
+    }
+
+    bool Session::nextReceiver(Receiver ^ rcvr, Duration ^ timeout)
+    {
+        System::Exception           ^ newException = nullptr;
+
+        try
+        {
+            ::qpid::messaging::Duration dur(timeout->Milliseconds);
+
+            return sessionp->nextReceiver(*(rcvr->receiverp), dur);
+        } 
+        catch (const ::qpid::types::Exception & error) 
+        {
+            String ^ errmsg = gcnew String(error.what());
+            if (errmsg = "No message to fetch")
+            {
+                // on timeout return null
+                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;
+                }
+
+                throw newException;
+            }
+        }
+        return true;
     }
 
-    System::UInt32 Session::getUnsettledAcks()
+    // receiver = next()
+    Receiver ^ Session::nextReceiver()
     {
-        return sessionp->getUnsettledAcks();
+        return nextReceiver(DurationConstants::FORVER);
     }
 
-    //bool Session::nextReceiver(Receiver)
-    //{
-    //    sessionp->nextReceiver(Receiver)
-    //}
+    Receiver ^ Session::nextReceiver(Duration ^ timeout)
+    {
+        System::Exception           ^ newException = nullptr;
+
+        try
+        {
+            ::qpid::messaging::Duration dur(timeout->Milliseconds);
+            ::qpid::messaging::Receiver * rcvr = new ::qpid::messaging::Receiver;
+
+            *rcvr = sessionp->::qpid::messaging::Session::nextReceiver(dur);
+
+            Receiver ^ newRcvr = gcnew Receiver(rcvr, this);
+
+            return newRcvr;
+        } 
+        catch (const ::qpid::types::Exception & error) 
+        {
+            String ^ errmsg = gcnew String(error.what());
+            if (errmsg = "No message to fetch")
+            {
+                // 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");
 
-    //bool Session::nextReceiver(Receiver, Duration timeout)
-    //{
-    //    sessionp->nextReceiver();
-    //}
+        }
+        finally
+        {
+            // Clean up and throw on caught exceptions
+            if (newException != nullptr)
+            {
+                if (sessionp != NULL)
+                {
+                    delete sessionp;
+                }
 
-    //Receiver Session::nextReceiver(Duration timeout)
-    //{
-    //}
+                throw newException;
+            }
+        }
+        return nullptr;
+    }
 
 
     Sender ^ Session::createSender  (System::String ^ address)
     {
-        // allocate a native sender
-        ::qpid::messaging::Sender * senderp = new ::qpid::messaging::Sender;
+        System::Exception          ^ newException = nullptr;
+        ::qpid::messaging::Sender  * senderp         = NULL;
+        Sender                     ^ newSender       = nullptr;
+
+        try
+        {
+            // allocate a native sender
+            ::qpid::messaging::Sender * senderp = new ::qpid::messaging::Sender ;
+
+            // create the sender
+            *senderp = sessionp->::qpid::messaging::Session::createSender(QpidMarshal::ToNative(address));
+
+            // create a managed sender
+            newSender = gcnew Sender(senderp, 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::createSender unknown error");
 
-        // create the sender
-        *senderp = sessionp->::qpid::messaging::Session::createSender(QpidMarshal::ToNative(address));
+        }
+        finally
+        {
+            // Clean up and throw on caught exceptions
+            if (newException != nullptr)
+            {
+                if (senderp != NULL)
+                {
+                    delete senderp;
+                }
 
-        // create a managed sender
-        Sender ^ newSender = gcnew Sender(senderp, this);
+                throw newException;
+            }
+        }
 
         return newSender;
     }
 
     Receiver ^ Session::createReceiver(System::String ^ address)
     {
-        // allocate a native receiver
-        ::qpid::messaging::Receiver * receiverp = new ::qpid::messaging::Receiver;
+        System::Exception           ^ newException = nullptr;
+        ::qpid::messaging::Receiver * receiverp    = NULL;
+        Receiver                    ^ newReceiver  = nullptr;
 
-        // create the receiver
-        *receiverp = sessionp->createReceiver(QpidMarshal::ToNative(address));
+        try
+        {
+            // allocate a native receiver
+            receiverp = new ::qpid::messaging::Receiver;
 
-        // create a managed receiver
-        Receiver ^ newReceiver = gcnew Receiver(receiverp, this);
+            // create the receiver
+            *receiverp = sessionp->createReceiver(QpidMarshal::ToNative(address));
+
+            // create a managed receiver
+            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
+            if (newException != nullptr)
+            {
+                if (sessionp != NULL)
+                {
+                    delete sessionp;
+                }
+
+                throw newException;
+            }
+        }
 
         return newReceiver;
     }
 
-    Connection ^ Session::getConnection()
+
+    Receiver ^ Session::createReceiver()
     {
-        return parentConnectionp;
+        System::Exception           ^ newException = nullptr;
+        ::qpid::messaging::Receiver * receiverp    = NULL;
+        Receiver                    ^ newReceiver  = nullptr;
+
+        try
+        {
+            // allocate a native receiver
+            receiverp = new ::qpid::messaging::Receiver;
+
+            // create a managed receiver
+            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
+            if (newException != nullptr)
+            {
+                if (sessionp != NULL)
+                {
+                    delete sessionp;
+                }
+
+                throw newException;
+            }
+        }
+
+        return newReceiver;
+    }
+
+
+    Sender ^ Session::getSender(System::String ^ name)
+    {
+        ::qpid::messaging::Sender * sender = new ::qpid::messaging::Sender;
+
+        *sender = sessionp->::qpid::messaging::Session::getSender(QpidMarshal::ToNative(name));
+
+        Sender ^ newSender = gcnew Sender(sender, this);
+
+        return newSender;
     }
 
-    bool Session::hasError()
+
+
+    Receiver ^ Session::getReceiver(System::String ^ name)
     {
-        return sessionp->hasError();
+        ::qpid::messaging::Receiver * receiver = new ::qpid::messaging::Receiver;
+
+        *receiver = sessionp->::qpid::messaging::Session::getReceiver(QpidMarshal::ToNative(name));
+
+        Receiver ^ newReceiver = gcnew Receiver(receiver, this);
+
+        return newReceiver;
+    }
+
+
+
+    Connection ^ Session::getConnection()
+    {
+        return parentConnectionp;
     }
 
     void Session::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=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Session.h Fri May 28 18:09:10 2010
@@ -49,6 +49,7 @@ namespace messaging {
     ref class Duration;
     ref class Receiver;
     ref class Sender;
+    ref class Message;
 
     public ref class Session
     {
@@ -74,20 +75,44 @@ namespace messaging {
         void rollback();
         void acknowledge();
         void acknowledge(bool sync);
-        //void reject(Message);
-        //void release(Message);
+        void reject(Message ^);
+        void release(Message ^);
         void sync();
         void sync(bool block);
-        System::UInt32 getReceivable();
-        System::UInt32 getUnsettledAcks();
-        //bool nextReceiver(Receiver);
-        //bool nextReceiver(Receiver, Duration timeout);
-        //Receiver nextReceiver(Duration timeout);
-        //bool nextReceiver()
-        Sender     ^ createSender  (System::String ^ address);
-        Receiver   ^ createReceiver(System::String ^ address);
+
+        property System::UInt32 Receivable
+        {
+            System::UInt32 get () { return sessionp->getReceivable(); }
+        }
+
+        property System::UInt32 UnsetledAcks
+        {
+            System::UInt32 get () { return sessionp->getUnsettledAcks(); }
+        }
+
+        // next(receiver)
+        bool nextReceiver(Receiver ^);
+        bool nextReceiver(Receiver ^, Duration ^ timeout);
+
+        // receiver = next()
+        Receiver ^ nextReceiver();
+        Receiver ^ nextReceiver(Duration ^ timeout);
+
+
+        Sender   ^ createSender  (System::String ^ address);
+        Receiver ^ createReceiver(System::String ^ address);
+        Receiver ^ createReceiver();
+
+        Sender   ^ getSender(System::String ^ name);
+        Receiver ^ getReceiver(System::String ^ name);
+
         Connection ^ getConnection();
-        bool hasError();
+
+        property System::Boolean HasError
+        {
+            System::Boolean get () { return sessionp->hasError(); }
+        }
+
         void checkError();
     };
 }}}}

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp?rev=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp Fri May 28 18:09:10 2010
@@ -0,0 +1,411 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <typeinfo.h>
+#include <string>
+#include <limits>
+#include <iostream>
+
+#include "TypeTranslator.h"
+#include "QpidTypeCheck.h"
+#include "QpidMarshal.h"
+
+namespace org {
+namespace apache {
+namespace qpid {
+namespace messaging {
+
+    /// <summary>
+    /// Translate between managed and native types.
+    /// </summary>
+
+    //
+    // The given object is a Dictionary.
+    // Add its elements to the qpid map.
+    //
+    void TypeTranslator::ManagedToNative(::qpid::types::Variant::Map & theMapp,
+                         QpidMap ^ theObjp)
+    {
+        // iterate the items, converting each to a variant and adding to the map
+        for each (System::Collections::Generic::KeyValuePair<System::String^, System::Object^> kvp in theObjp)
+        {
+            if (QpidTypeCheck::ObjectIsMap(kvp.Value))
+            {
+                // Recurse on inner map
+                // Allocate a map
+                ::qpid::types::Variant::Map newMap;
+
+                // Add the map variables to the map
+                ManagedToNative(newMap, (QpidMap ^)kvp.Value);
+
+                // Create a variant entry for the inner map
+                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
+
+                // Get map's name
+                std::string entryName = QpidMarshal::ToNative(kvp.Key);
+
+                // Add inner map to outer map
+                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, *newVariantp));
+            }
+            else if (QpidTypeCheck::ObjectIsList(kvp.Value))
+            {
+                // Recurse on inner list
+                // Allocate a list
+                ::qpid::types::Variant::List newList;
+
+                // Add the List variables to the list
+                ManagedToNative(newList, (QpidList ^)kvp.Value);
+
+                // Create a variant entry for the inner map
+                ::qpid::types::Variant::List newVariant(newList);
+
+                //std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
+
+                // Get list's name
+                std::string entryName = QpidMarshal::ToNative(kvp.Key);
+
+                // Add inner list to outer map
+                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, newVariant));
+            }
+            else
+            {
+                // Add a simple native type to map
+                ::qpid::types::Variant entryValue;
+                ManagedToNativeObject(kvp.Value, entryValue);
+                std::string entryName = QpidMarshal::ToNative(kvp.Key);
+                theMapp.insert(std::make_pair<std::string, ::qpid::types::Variant>(entryName, entryValue));
+            }
+        }
+    }
+
+
+
+    //
+    // The given object is a List.
+    // Add its elements to the qpid list.
+    //
+    void TypeTranslator::ManagedToNative(::qpid::types::Variant::List & theListp,
+                         QpidList ^ theObjp)
+    {
+        // iterate the items, converting each to a variant and adding to the map
+        for each (System::Object ^ listObj in theObjp)
+        {
+            if (QpidTypeCheck::ObjectIsMap(listObj))
+            {
+                // Recurse on inner map
+                // Allocate a map
+                ::qpid::types::Variant::Map newMap;
+
+                // Add the map variables to the map
+                ManagedToNative(newMap, (QpidMap ^)listObj);
+
+                // Create a variant entry for the inner map
+                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
+
+                // Add inner map to outer list
+                theListp.push_back(*newVariantp);
+            }
+            else if (QpidTypeCheck::ObjectIsList(listObj))
+            {
+                // Recurse on inner list
+                // Allocate a list
+                ::qpid::types::Variant::List newList;
+
+                // Add the List variables to the list
+                ManagedToNative(newList, (QpidList ^)listObj);
+
+                // Create a variant entry for the inner list
+                std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
+
+                // Add inner list to outer list
+                theListp.push_back(*newVariantp);
+            }
+            else
+            {
+                // Add a simple native type to list
+                ::qpid::types::Variant entryValue;
+                ManagedToNativeObject(listObj, entryValue);
+                theListp.push_back(entryValue);
+            }
+        }
+    }
+
+
+
+    //
+    // Returns a variant representing simple native type object.
+    // Not to be called for Map/List objects.
+    //
+    void TypeTranslator::ManagedToNativeObject(System::Object ^ theObjp, 
+                               ::qpid::types::Variant & targetp)
+    {
+        System::Type     ^ typeP    = (*theObjp).GetType();
+        System::TypeCode   typeCode = System::Type::GetTypeCode( typeP );
+
+        switch (typeCode)
+        {
+        case System::TypeCode::Boolean :
+            targetp = System::Convert::ToBoolean(theObjp);
+            break;
+
+        case System::TypeCode::Byte :
+            targetp = System::Convert::ToByte(theObjp);
+            break;
+
+        case System::TypeCode::UInt16 :
+            targetp = System::Convert::ToUInt16(theObjp);
+            break;
+
+        case System::TypeCode::UInt32 :
+            targetp = System::Convert::ToUInt32(theObjp);
+            break;
+
+        case System::TypeCode::UInt64 :
+            targetp = System::Convert::ToUInt64(theObjp);
+            break;
+
+        case System::TypeCode::Char :
+        case System::TypeCode::SByte :
+            targetp = System::Convert::ToSByte(theObjp);
+            break;
+
+        case System::TypeCode::Int16 :
+            targetp = System::Convert::ToInt16(theObjp);
+            break;
+
+        case System::TypeCode::Int32 :
+            targetp = System::Convert::ToInt32(theObjp);
+            break;
+
+        case System::TypeCode::Int64 :
+            targetp = System::Convert::ToInt64(theObjp);
+            break;
+
+        case System::TypeCode::Single :
+            targetp = System::Convert::ToSingle(theObjp);
+            break;
+
+        case System::TypeCode::Double :
+            targetp = System::Convert::ToDouble(theObjp);
+            break;
+
+        case System::TypeCode::String :
+            {
+                std::string      rString;
+                System::String ^ rpString;
+
+                rpString = System::Convert::ToString(theObjp);
+                rString = QpidMarshal::ToNative(rpString);
+                targetp = rString;
+                targetp.setEncoding(QpidMarshal::ToNative("utf8"));
+            }
+            break;
+
+            
+        default:
+
+            throw gcnew System::NotImplementedException();
+
+        }
+    }
+
+
+    // Given a user Dictionary and a qpid map,
+    //   extract the qpid elements and put them into the dictionary.
+    //
+    void TypeTranslator::NativeToManaged(QpidMap ^ dict, ::qpid::types::Variant::Map & map)
+    {
+        // For each object in the message map, 
+        //  create a .NET object and add it to the dictionary.
+        for (::qpid::types::Variant::Map::const_iterator i = map.begin(); i != map.end(); ++i) {
+            // Get the name
+            System::String ^ elementName = gcnew String(i->first.c_str());
+
+            ::qpid::types::Variant     variant = i->second;
+            ::qpid::types::VariantType vType   = variant.getType();
+
+            switch (vType)
+            {
+            case ::qpid::types::VAR_BOOL:
+                dict[elementName] = variant.asBool();
+                break;
+                
+            case ::qpid::types::VAR_UINT8:
+                dict[elementName] = variant.asUint8();
+                break;
+                
+            case ::qpid::types::VAR_UINT16:
+                dict[elementName] = variant.asUint16();
+                break;
+                
+            case ::qpid::types::VAR_UINT32:
+                dict[elementName] = variant.asUint32();
+                break;
+                
+            case ::qpid::types::VAR_UINT64:
+                dict[elementName] = variant.asUint64();
+                break;
+                
+            case ::qpid::types::VAR_INT8:
+                dict[elementName] = variant.asInt8();
+                break;
+                
+            case ::qpid::types::VAR_INT16:
+                dict[elementName] = variant.asInt16();
+                break;
+                
+            case ::qpid::types::VAR_INT32:
+                dict[elementName] = variant.asInt32();
+                break;
+                
+            case ::qpid::types::VAR_INT64:
+                dict[elementName] = variant.asInt64();
+                break;
+                
+            case ::qpid::types::VAR_FLOAT:
+                dict[elementName] = variant.asFloat();
+                break;
+                
+            case ::qpid::types::VAR_DOUBLE:
+                dict[elementName] = variant.asDouble();
+                break;
+                
+            case ::qpid::types::VAR_STRING:
+                {
+                    System::String ^ elementValue = gcnew System::String(variant.asString().c_str());
+                    dict[elementName] = elementValue;
+                    break;
+                }
+            case ::qpid::types::VAR_MAP:
+                {
+                    QpidMap ^ newDict = gcnew QpidMap();
+
+                    NativeToManaged(newDict, variant.asMap());
+
+                    dict[elementName] = newDict;
+                    break;
+                }
+
+            case ::qpid::types::VAR_LIST:
+                {
+                    QpidList ^ newList = gcnew QpidList();
+
+                    NativeToManaged(newList, variant.asList());
+
+                    dict[elementName] = newList;
+                    break;
+                }
+                
+            case ::qpid::types::VAR_UUID:
+                break;
+            }
+        }
+    }
+
+
+    void TypeTranslator::NativeToManaged(QpidList ^ vList, ::qpid::types::Variant::List & qpidList)
+    {
+        // For each object in the message map, 
+        //  create a .NET object and add it to the dictionary.
+        for (::qpid::types::Variant::List::const_iterator i = qpidList.begin(); i != qpidList.end(); ++i) 
+        {
+            ::qpid::types::Variant     variant = *i;
+            ::qpid::types::VariantType vType   = variant.getType();
+
+            switch (vType)
+            {
+            case ::qpid::types::VAR_BOOL:
+                (*vList).Add(variant.asBool());
+                break;
+                
+            case ::qpid::types::VAR_UINT8:
+                (*vList).Add(variant.asUint8());
+                break;
+                
+            case ::qpid::types::VAR_UINT16:
+                (*vList).Add(variant.asUint16());
+                break;
+                
+            case ::qpid::types::VAR_UINT32:
+                (*vList).Add(variant.asUint32());
+                break;
+                
+            case ::qpid::types::VAR_UINT64:
+                (*vList).Add(variant.asUint64());
+                break;
+                
+            case ::qpid::types::VAR_INT8:
+                (*vList).Add(variant.asInt8());
+                break;
+                
+            case ::qpid::types::VAR_INT16:
+                (*vList).Add(variant.asInt16());
+                break;
+                
+            case ::qpid::types::VAR_INT32:
+                (*vList).Add(variant.asInt32());
+                break;
+                
+            case ::qpid::types::VAR_INT64:
+                (*vList).Add(variant.asInt64());
+                break;
+                
+            case ::qpid::types::VAR_FLOAT:
+                (*vList).Add(variant.asFloat());
+                break;
+                
+            case ::qpid::types::VAR_DOUBLE:
+                (*vList).Add(variant.asDouble());
+                break;
+                
+            case ::qpid::types::VAR_STRING:
+                {
+                    System::String ^ elementValue = gcnew System::String(variant.asString().c_str());
+                    (*vList).Add(elementValue);
+                    break;
+                }
+            case ::qpid::types::VAR_MAP:
+                {
+                    QpidMap ^ newDict = gcnew QpidMap();
+
+                    NativeToManaged(newDict, variant.asMap());
+
+                    (*vList).Add(newDict);
+                    break;
+                }
+
+            case ::qpid::types::VAR_LIST:
+                {
+                    QpidList ^ newList = gcnew QpidList();
+
+                    NativeToManaged(newList, variant.asList());
+
+                    (*vList).Add(newList);
+                    break;
+                }
+                
+            case ::qpid::types::VAR_UUID:
+                break;
+            }
+        }
+    }
+}}}}

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h?rev=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h Fri May 28 18:09:10 2010
@@ -0,0 +1,70 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/types/Variant.h"
+
+#include "QpidTypeCheck.h"
+
+namespace org {
+namespace apache {
+namespace qpid {
+namespace messaging {
+
+    /// <summary>
+    /// TypeTranslator provides codec between .NET Dictionary/List and
+    /// qpid messaging Map/List.
+    /// </summary>
+
+    public ref class TypeTranslator
+    {
+
+    public:
+        // The given object is a Dictionary.
+        // Add its elements to the qpid map.
+        static void ManagedToNative(::qpid::types::Variant::Map & theMapp,
+                                    QpidMap ^ theObjp);
+
+        // The given object is a List.
+        // Add its elements to the qpid list.
+        static void ManagedToNative(::qpid::types::Variant::List & theListp,
+                                    QpidList ^ theObjp);
+
+        // The given object is a simple native type (not a Dictionary or List)
+        // Returns a variant representing simple native type object.
+        static void ManagedToNativeObject(System::Object ^ theObjp,
+                                          ::qpid::types::Variant & targetp);
+
+        // Given a Dictionary,
+        // Return its values in a Qpid map
+        static void NativeToManaged(QpidMap ^ dict, 
+                                    ::qpid::types::Variant::Map & map);
+
+        // Given a List,
+        // Return its values in a Qpid list
+        static void NativeToManaged(QpidList ^ vList, 
+                                    ::qpid::types::Variant::List & qpidList);
+    };
+}}}}

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/app.rc
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/app.rc?rev=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/app.rc (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/app.rc Fri May 28 18:09:10 2010
@@ -20,6 +20,7 @@
 
 LANGUAGE 9, 1
 #pragma code_page(1252)
+1           ICON         "app.ico"
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc?rev=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc Fri May 28 18:09:10 2010
@@ -0,0 +1,101 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource1.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource1.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,3,0,1
+ PRODUCTVERSION 1,3,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "FileDescription", "org"
+            VALUE "FileVersion", "1, 3, 0, 1"
+            VALUE "InternalName", "org"
+            VALUE "LegalCopyright", "Copyright (C) 2010"
+            VALUE "OriginalFilename", "org.apache.qpid.messaging"
+            VALUE "ProductName", "org"
+            VALUE "ProductVersion", "1, 3, 0, 1"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj?rev=949245&r1=949244&r2=949245&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj Fri May 28 18:09:10 2010
@@ -44,7 +44,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(QPID_BUILD_ROOT)\include&quot;;&quot;$(QPID_BUILD_ROOT)\src&quot;"
+				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\..\include&quot;;&quot;$(ProjectDir)..\..\..\..\src&quot;"
 				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,12 +63,13 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions=" /STACK:10000000 /machine:I386"
-				AdditionalDependencies="$(QPID_BUILD_ROOT)\src\Debug\qpidclientd.lib $(QPID_BUILD_ROOT)\src\Debug\qpidcommond.lib"
-				OutputFile="$(OutDir)\org.apache.qpid.messagingd.dll"
+				AdditionalDependencies="$(ProjectDir)..\..\..\..\src\Debug\qpidclientd.lib $(ProjectDir)..\..\..\..\src\Debug\qpidcommond.lib $(ProjectDir)..\..\..\..\src\Debug\qpidmessagingd.lib"
+				OutputFile="$(ProjectDir)..\..\..\..\src\$(ConfigurationName)\org.apache.qpid.messagingd.dll"
 				LinkIncremental="1"
 				GenerateDebugInformation="true"
 				AssemblyDebug="1"
 				TargetMachine="1"
+				KeyFile="qpid.snk"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -90,6 +91,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine=""
 			/>
 		</Configuration>
 		<Configuration
@@ -188,15 +190,15 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath=".\AssemblyInfo.cpp"
+				RelativePath=".\Address.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\Connection.cpp"
+				RelativePath=".\AssemblyInfo.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\Duration.cpp"
+				RelativePath=".\Connection.cpp"
 				>
 			</File>
 			<File
@@ -215,6 +217,10 @@
 				RelativePath=".\Session.cpp"
 				>
 			</File>
+			<File
+				RelativePath=".\TypeTranslator.cpp"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
@@ -222,6 +228,10 @@
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
 			<File
+				RelativePath=".\Address.h"
+				>
+			</File>
+			<File
 				RelativePath=".\Connection.h"
 				>
 			</File>
@@ -238,6 +248,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\QpidTypeCheck.h"
+				>
+			</File>
+			<File
 				RelativePath=".\Receiver.h"
 				>
 			</File>
@@ -249,6 +263,10 @@
 				RelativePath=".\Session.h"
 				>
 			</File>
+			<File
+				RelativePath=".\TypeTranslator.h"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Resource Files"
@@ -260,11 +278,11 @@
 				>
 			</File>
 			<File
-				RelativePath=".\app.rc"
+				RelativePath=".\org.apache.qpid.messaging.rc"
 				>
 			</File>
 			<File
-				RelativePath=".\resource.h"
+				RelativePath=".\resource1.h"
 				>
 			</File>
 		</Filter>

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk?rev=949245&view=auto
==============================================================================
Binary file - no diff available.

Propchange: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/resource1.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/resource1.h?rev=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/resource1.h (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/resource1.h Fri May 28 18:09:10 2010
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by org.apache.qpid.messaging.rc
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif

Added: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs?rev=949245&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs (added)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs Fri May 28 18:09:10 2010
@@ -0,0 +1,55 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("org.apache.qpid.messaging.sessionreceiver")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("org.apache.qpid.messaging.sessionreceiver")]
+[assembly: AssemblyCopyright("Copyright ©  2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e18f363a-a9b0-4251-8f3c-de0e9d9d6827")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]



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