diff options
| author | Charles E. Rolke <chug@apache.org> | 2010-12-01 19:54:13 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2010-12-01 19:54:13 +0000 |
| commit | a3ec0c3d16162606321c7f89e4ef78bccd0a12a0 (patch) | |
| tree | 32954a6a92d7a1d9a984020bbd55100d283619aa /cpp/bindings/qpid/dotnet/examples/csharp.map.receiver | |
| parent | e5ddc402681322fc0031b3d2bc39b1d75e8a1080 (diff) | |
| download | qpid-python-a3ec0c3d16162606321c7f89e4ef78bccd0a12a0.tar.gz | |
Bring QPID .NET Binding examples more in line with cpp examples.
1. Return 0/1 from main to indicate success/failure, where possible.
2. Call sender's session.Sync() after transmitting messages and not waiting for responses.
3. Add third arg connectionOptions as used in cpp examples.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1041141 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, 6 insertions, 1 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 a3b13e2dcd..5219ee789a 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 @@ -32,14 +32,18 @@ namespace Org.Apache.Qpid.Messaging.examples // Send an amqp/map message to amqp:tcp:localhost:5672 amq.direct/map_example
// The map message
//
- static void Main(string[] args)
+ static int Main(string[] args)
{
string url = "amqp:tcp:localhost:5672";
string address = "message_queue; {create: always}";
+ string connectionOptions = "";
+
if (args.Length > 0)
url = args[0];
if (args.Length > 1)
address = args[1];
+ if (args.Length > 2)
+ connectionOptions = args[3];
//
// Create and open an AMQP connection to the broker URL
@@ -76,6 +80,7 @@ namespace Org.Apache.Qpid.Messaging.examples //
receiver.Close();
connection.Close();
+ return 0;
}
}
}
|
