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.example.drain/csharp.example.drain.cs | |
| 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.example.drain/csharp.example.drain.cs')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs b/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs index dc38590f0a..04a0764f7c 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs +++ b/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs @@ -30,7 +30,7 @@ namespace Org.Apache.Qpid.Messaging.Examples { //
// Sample invocation: csharp.example.drain.exe --broker localhost:5672 --timeout 30 my-queue
//
- static void Main(string[] args) {
+ static int Main(string[] args) {
Options options = new Options(args);
Connection connection = null;
@@ -74,6 +74,7 @@ namespace Org.Apache.Qpid.Messaging.Examples { receiver.Close();
session.Close();
connection.Close();
+ return 0;
}
catch (Exception e)
{
@@ -81,6 +82,7 @@ namespace Org.Apache.Qpid.Messaging.Examples { if (null != connection)
connection.Close();
}
+ return 1;
}
}
}
|
