diff options
| author | Ted Ross <tross@apache.org> | 2010-08-20 13:58:20 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-08-20 13:58:20 +0000 |
| commit | 5269fc0e04984b2d196d5eaf96e206e034d21184 (patch) | |
| tree | 2c5c273773ce707de712e7691a00003639c0f281 /cpp/bindings/qpid/dotnet/examples/csharp.map.receiver | |
| parent | fdfefb5e9721cb85d70a81928044f61b7f48ccf3 (diff) | |
| download | qpid-python-5269fc0e04984b2d196d5eaf96e206e034d21184.tar.gz | |
QPID-2798 - C++ Messaging Client .NET binding fails to clone managed objects correctly
Patch from Chuck Rolke
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987510 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/examples/csharp.map.receiver')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs b/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs index 242944be92..a3b13e2dcd 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs +++ b/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs @@ -35,8 +35,11 @@ namespace Org.Apache.Qpid.Messaging.examples static void Main(string[] args)
{
string url = "amqp:tcp:localhost:5672";
+ string address = "message_queue; {create: always}";
if (args.Length > 0)
url = args[0];
+ if (args.Length > 1)
+ address = args[1];
//
// Create and open an AMQP connection to the broker URL
@@ -49,7 +52,7 @@ namespace Org.Apache.Qpid.Messaging.examples // routing key "map_example".
//
Session session = connection.CreateSession();
- Receiver receiver = session.CreateReceiver("amq.direct/map_example");
+ Receiver receiver = session.CreateReceiver(address);
//
// Fetch the message from the broker
@@ -61,7 +64,7 @@ namespace Org.Apache.Qpid.Messaging.examples //
Dictionary<string, object> content = new Dictionary<string, object>();
message.GetContent(content);
- Console.WriteLine("Received: {0}", message.AsString(content));
+ Console.WriteLine("{0}", message.AsString(content));
//
// Acknowledge the receipt of all received messages.
|
