From 9e522de1ececed29fa9c0a02caa535c4f235b486 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 28 May 2010 18:09:10 +0000 Subject: QPID-2628 - Patch from Chuck Rolke git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@949245 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/bindings/qpid/dotnet/ReadMe.txt | 33 +- .../csharp.direct.receiver.cs | 19 +- .../csharp.direct.receiver.csproj | 12 +- .../csharp.direct.sender/csharp.direct.sender.cs | 15 +- .../csharp.direct.sender.csproj | 12 +- .../Properties/AssemblyInfo.cs | 54 +++ .../csharp.map.callback.receiver.cs | 280 +++++++++++ .../csharp.map.callback.receiver.csproj | 69 +++ .../Properties/AssemblyInfo.cs | 54 +++ .../csharp.map.callback.sender.cs | 146 ++++++ .../csharp.map.callback.sender.csproj | 66 +++ .../csharp.map.receiver/csharp.map.receiver.csproj | 16 +- .../csharp.map.receiver/csharp.map.recevier.cs | 4 +- .../csharp.map.sender/csharp.map.sender.csproj | 12 +- .../qpid/dotnet/org.apache.qpid.messaging.sln | 44 ++ qpid/cpp/bindings/qpid/dotnet/src/Address.cpp | 186 ++++++++ qpid/cpp/bindings/qpid/dotnet/src/Address.h | 89 ++++ qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp | 194 +++++++- qpid/cpp/bindings/qpid/dotnet/src/Connection.h | 21 +- qpid/cpp/bindings/qpid/dotnet/src/Duration.h | 65 ++- qpid/cpp/bindings/qpid/dotnet/src/Message.cpp | 515 +++++---------------- qpid/cpp/bindings/qpid/dotnet/src/Message.h | 82 ++-- qpid/cpp/bindings/qpid/dotnet/src/QpidException.h | 38 ++ qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h | 1 + qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h | 75 +++ qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp | 145 +++++- qpid/cpp/bindings/qpid/dotnet/src/Receiver.h | 20 +- qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp | 29 +- qpid/cpp/bindings/qpid/dotnet/src/Sender.h | 33 +- qpid/cpp/bindings/qpid/dotnet/src/Session.cpp | 305 ++++++++++-- qpid/cpp/bindings/qpid/dotnet/src/Session.h | 47 +- .../bindings/qpid/dotnet/src/TypeTranslator.cpp | 411 ++++++++++++++++ qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h | 70 +++ qpid/cpp/bindings/qpid/dotnet/src/app.rc | 1 + .../qpid/dotnet/src/org.apache.qpid.messaging.rc | 101 ++++ .../dotnet/src/org.apache.qpid.messaging.vcproj | 34 +- qpid/cpp/bindings/qpid/dotnet/src/qpid.snk | Bin 0 -> 596 bytes qpid/cpp/bindings/qpid/dotnet/src/resource.h | 22 - qpid/cpp/bindings/qpid/dotnet/src/resource1.h | 14 + .../src/sessionreceiver/Properties/AssemblyInfo.cs | 55 +++ ...rg.apache.qpid.messaging.sessionreceiver.csproj | 65 +++ .../dotnet/src/sessionreceiver/sessionreceiver.cs | 133 ++++++ .../dotnet/test/messaging.test/messaging.test.cs | 62 ++- .../test/messaging.test/messaging.test.csproj | 18 +- 44 files changed, 2997 insertions(+), 670 deletions(-) create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs create mode 100644 qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/Address.cpp create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/Address.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/QpidException.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.rc create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/qpid.snk delete mode 100644 qpid/cpp/bindings/qpid/dotnet/src/resource.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/resource1.h create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/org.apache.qpid.messaging.sessionreceiver.csproj create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs (limited to 'qpid') diff --git a/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt b/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt index 66ac7ae50e..faa1b79d4b 100644 --- a/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt +++ b/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt @@ -3,31 +3,46 @@ Qpid.cpp.bindings.qpid.dotnet binding package. 1. Features =========== -This binding package is a .NET Interop wrapper around the Qpid Messaging interface. -It exposes the Messaging interface through a series of managed code classes that -may be used by any .NET language. +A. This binding package provides a .NET Interop wrapper around the C++ + Qpid Messaging interface. It exposes the Messaging interface through + a series of managed code classes that may be used by any .NET language. + +B. A sessionreceiver assembly provides session callback functionality + above the C++ layer. 2. Prerequisites ================ -1. A build of the Qpid C++ libraries is available. +A. A build of the Qpid C++ libraries is available. -2. Refer to this library using environment variable QPID_BUILD_ROOT. +B. Refer to this library using environment variable QPID_BUILD_ROOT. for example: SET QPID_BUILD_ROOT=D:\users\submitter\svn\qpid\cpp 3. Building the solution ======================== -1. Build the solution. +A. The solution is cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sln + +B. Build the solution (Debug only - Release is not set up yet). -4. Runing the examples +C. Project output goes to %QPID_BUILD_ROOT%\src\Debug. This puts all the + solution artifacts is the same directory as the C++ DLLs. + + +4. Running the examples ====================== -CWIP +A. csharp.direct.receiver +B. csharp.direct.sender +C. csharp.map.receiver +D. csharp.map.sender +E. csharp.map.callback.receiver +F. csharp.map.callback.sender + 5. Running the tests ==================== -CWIP +A. messaging.test diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs index 6cc2a5e0a5..4888023830 100644 --- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs @@ -37,7 +37,20 @@ namespace CSharpDirect { String host = "localhost:5672"; String addr = "amq.direct/key"; - int nMsg = 10; + Int32 nMsg = 10; + + if (args.Length > 0) + host = args[0]; + if (args.Length > 1) + addr = args[1]; + if (args.Length > 2) + nMsg = Convert.ToInt32(args[2]); + + Console.WriteLine("csharp.direct.receiver"); + Console.WriteLine("host : {0}", host); + Console.WriteLine("addr : {0}", addr); + Console.WriteLine("nMsg : {0}", nMsg); + Console.WriteLine(); Connection conn = new Connection(host); @@ -52,7 +65,7 @@ namespace CSharpDirect Session sess = conn.createSession(); - Duration dur = new Duration(1000 * 3600 * 24); // Wait one day + Duration dura = new Duration(3600000); // wait forever Receiver rcv = sess.createReceiver(addr); @@ -62,7 +75,7 @@ namespace CSharpDirect { try { - Message msg2 = rcv.fetch(dur); + Message msg2 = rcv.fetch(dura); Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.getContent()); } catch (Exception e) diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj index 8cb4826a01..7bfcfb8331 100644 --- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj @@ -17,7 +17,7 @@ true full false - bin\Debug\ + ..\..\..\..\..\src\Debug\ DEBUG;TRACE prompt 4 @@ -31,10 +31,6 @@ 4 - - False - ..\..\bin\Debug\org.apache.qpid.messagingd.dll - 3.5 @@ -52,6 +48,12 @@ + + + {AA5A3B83-5F98-406D-A01C-5A921467A57D} + org.apache.qpid.messaging + + + diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1f849441d4 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* +* 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("csharp.map.sender")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("csharp.map.sender")] +[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("1eec2eca-adbd-4394-8b01-f4c4645bb122")] + +// 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")] diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs new file mode 100644 index 0000000000..a097267f5f --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs @@ -0,0 +1,146 @@ +/* + * + * 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; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using org.apache.qpid.messaging; + +namespace org.apache.qpid.messaging.examples +{ + class MapSender + { + // + // usage + // + static void usage(string url, string addr, UInt32 count) + { + + Console.WriteLine("usage: {0} [url [addr [count]]]", + System.Diagnostics.Process.GetCurrentProcess().ProcessName); + Console.WriteLine(); + Console.WriteLine("A program to connect to a broker and send N"); + 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(" count = number of messages to send"); + Console.WriteLine(); + Console.WriteLine("Default values:"); + Console.WriteLine(" {0} {1} {2} {3}", + System.Diagnostics.Process.GetCurrentProcess().ProcessName, + url, addr, count); + } + + + // + // TestProgram + // + public void TestProgram(string[] args) + { + string url = "amqp:tcp:localhost:5672"; + string addr = "amq.direct/map_example"; + UInt32 count = 1; + + if (1 == args.Length) + { + if (args[0].Equals("-h") || args[0].Equals("-H") || args[0].Equals("/?")) + { + usage(url, addr, count); + return; + } + } + + if (args.Length > 0) + url = args[0]; + if (args.Length > 1) + addr = args[1]; + if (args.Length > 2) + count = System.Convert.ToUInt32(args[2]); + + + // + // Create and open an AMQP connection to the broker URL + // + Connection connection = new Connection(url); + 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); + + // + // Create structured content for the message. This example builds a + // map of items including a nested map and a list of values. + // + Dictionary content = new Dictionary(); + Dictionary subMap = new Dictionary(); + List colors = new List(); + + content["id"] = 987654321; + content["name"] = "Widget"; + content["percent"] = 0.99; + + subMap["name"] = "Smith"; + subMap["number"] = 354; + + content["nested"] = subMap; + + colors.Add("red"); + colors.Add("green"); + colors.Add("white"); + + content["colors"] = colors; + + // + // Construct a message with the map content and send it synchronously + // via the sender. + // + Message message = new Message(content); + for (UInt32 i = 0; i + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {12F1C14F-5C7D-4075-9BAE-C091394FF99A} + Exe + Properties + csharp.map.callback.sender + csharp.map.callback.sender + v3.5 + 512 + + + true + full + false + ..\..\..\..\..\src\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {AA5A3B83-5F98-406D-A01C-5A921467A57D} + org.apache.qpid.messaging + + + + + diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.csproj b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.csproj index a491274c62..380e33bb7d 100644 --- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.csproj +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.csproj @@ -17,7 +17,7 @@ true full false - bin\Debug\ + ..\..\..\..\..\src\Debug\ DEBUG;TRACE prompt 4 @@ -31,10 +31,6 @@ 4 - - False - ..\..\bin\Debug\org.apache.qpid.messagingd.dll - 3.5 @@ -52,6 +48,16 @@ + + + {AA5A3B83-5F98-406D-A01C-5A921467A57D} + org.apache.qpid.messaging + + + {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05} + org.apache.qpid.messaging.sessionreceiver + + + diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs new file mode 100644 index 0000000000..73956ecdef --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs @@ -0,0 +1,133 @@ +/* + * + * 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; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using org.apache.qpid.messaging; + +namespace org.apache.qpid.messaging.sessionreceiver +{ + /// + /// ISessionReceiver interface defines the callback for users to supply. + /// Once established this callback will receive all messages for all + /// receivers defined by the current session. + /// Users are expected not to 'fetch' or 'get' messages by any other means. + /// Users must acknowledge() the Session's messages either in the callback + /// function or by some other scheme. + /// + + public interface ISessionReceiver + { + void SessionReceiver(Receiver receiver, Message message); + } + + + /// + /// eventEngine - wait for messages from the underlying C++ code. + /// When available get them and deliver them via callback to our + /// client through the ISessionReceiver interface. + /// This class consumes the thread that calls the Run() function. + /// + + internal class eventEngine + { + private Session session; + private ISessionReceiver callback; + private bool keepRunning; + + public eventEngine(Session theSession, ISessionReceiver thecallback) + { + this.session = theSession; + this.callback = thecallback; + } + + /// + /// Function to call Session's nextReceiver, discover messages, + /// and to deliver messages through the callback. + /// + public void open() + { + Receiver rcvr = session.createReceiver(); + Message msg; + + keepRunning = true; + while (keepRunning) + { + if (session.nextReceiver(rcvr, DurationConstants.SECOND)) + { + if (keepRunning) + { + msg = rcvr.fetch(DurationConstants.SECOND); + this.callback.SessionReceiver(rcvr, msg); + } + } + //else + // receive timed out + // eventEngine exits the nextReceiver() function periodically + // in order to test the keepRunning flag + } + // Private thread is now exiting. + } + + /// + /// Function to stop the eventEngine. Private thread will exit within + /// one second. + /// + public void close() + { + keepRunning = false; + } + } + + + /// + /// server is the class that users instantiate to connect a SessionReceiver + /// callback to the stream of received messages received on a Session. + /// + public class server + { + private eventEngine ee; + + /// + /// Constructor for the server. + /// + /// The Session whose messages are collected. + /// The user function call with each message. + /// + public server(Session session, ISessionReceiver callback) + { + ee = new eventEngine(session, callback); + + new System.Threading.Thread( + new System.Threading.ThreadStart(ee.open)).Start(); + } + + /// + /// Function to stop the server. + /// + public void close() + { + ee.close(); + } + } +} diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs index 63a85486d3..5d161728e5 100644 --- a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs @@ -12,27 +12,77 @@ namespace org.apache.qpid.messaging { // // Duration test - stub until proper nunit tests are ready... - // + Duration myDuration = new Duration(1234); Console.WriteLine("Duration should be : 1234, is : {0}", - myDuration.getMilliseconds()); + myDuration.Milliseconds); Console.WriteLine("Duration FOREVER should be : 1.8x10^19 (realbig), is : {0}", - myDuration.FOREVER()); + DurationConstants.FORVER.Milliseconds); Console.WriteLine("Duration IMMEDIATE should be : 0, is : {0}", - myDuration.IMMEDIATE()); + DurationConstants.IMMEDIATE.Milliseconds); Console.WriteLine("Duration SECOND should be : 1,000, is : {0}", - myDuration.SECOND()); + DurationConstants.SECOND.Milliseconds); Console.WriteLine("Duration MINUTE should be : 60,000, is : {0}", - myDuration.MINUTE()); + DurationConstants.MINUTE.Milliseconds); + + Duration isInfinite = new Duration(); + Console.WriteLine("Duration() should be : realbig, is : {0}", + isInfinite.Milliseconds); + + Duration fiveMinutes = new Duration(DurationConstants.MINUTE.Milliseconds * 5); + Console.WriteLine("Duration 5MINUTE should be : 300,000, is : {0}", + fiveMinutes.Milliseconds); + + Duration fiveSec = DurationConstants.SECOND * 5; + Console.WriteLine("Duration 5SECOND should be : 5,000 is : {0}", + fiveSec.Milliseconds); // // and so on // + + Dictionary dx = new Dictionary(); + + Console.WriteLine("Dictionary.GetType() {0}", dx.GetType()); + + // + // Address test + // + Address aEmpty = new Address(); + Address aStr = new Address("rare"); + + Dictionary options = new Dictionary(); + options["one"] = 1; + options["two"] = "two"; + + Address aSubj = new Address("rare2", "subj", options); + + Address aType = new Address ("check3", "subj", options, "hot"); + + Console.WriteLine("aEmpty : {0}", aEmpty.str()); + Console.WriteLine("aStr : {0}", aStr.str()); + Console.WriteLine("aSubj : {0}", aSubj.str()); + Console.WriteLine("aType : {0}", aType.str()); + + // + // Raw message data retrieval + // + + Message m2 = new Message("rarey"); + UInt64 m2Size = m2.getContentSize(); + + + byte[] myRaw = new byte [m2Size]; + + m2.getRaw(myRaw); + Console.WriteLine("Got raw array size {0}", m2Size); + for (UInt64 i = 0; i < m2Size; i++) + Console.Write("{0} ", myRaw[i].ToString()); } } } diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.csproj b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.csproj index 0c9d6af140..08c0147640 100644 --- a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.csproj +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.csproj @@ -17,7 +17,7 @@ true full false - bin\Debug\ + ..\..\..\..\..\src\Debug\ DEBUG;TRACE prompt 4 @@ -31,10 +31,6 @@ 4 - - False - ..\..\bin\Debug\org.apache.qpid.messagingd.dll - 3.5 @@ -52,6 +48,12 @@ + + + {AA5A3B83-5F98-406D-A01C-5A921467A57D} + org.apache.qpid.messaging + + + + + + + + -- cgit v1.2.1