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.direct.receiver/csharp.direct.receiver.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.direct.receiver/csharp.direct.receiver.cs')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs index cb4cb3e37d..592a05ab29 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs +++ b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs @@ -31,7 +31,7 @@ namespace CSharpDirect // Receive 10 messages from localhost:5672, amq.direct/key
// Messages are assumed to be printable strings.
//
- static void Main(string[] args)
+ static int Main(string[] args)
{
String host = "localhost:5672";
String addr = "amq.direct/key";
@@ -66,12 +66,14 @@ namespace CSharpDirect Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.GetContent());
}
connection.Close();
+ return 0;
}
} catch (Exception e) {
Console.WriteLine("Exception {0}.", e);
if (null != connection)
connection.Close();
}
+ return 1;
}
}
}
\ No newline at end of file |
