diff options
| author | Ted Ross <tross@apache.org> | 2010-06-09 11:59:38 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-06-09 11:59:38 +0000 |
| commit | 077b8b25ab7fac22daf8494feb125cd5c73b95ac (patch) | |
| tree | f0f2d8b17c7ef912d16d3110bc18790006bbd87a /cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs | |
| parent | b6b344dccb18ed44500232e492573244b8a6bdf3 (diff) | |
| download | qpid-python-077b8b25ab7fac22daf8494feb125cd5c73b95ac.tar.gz | |
QPID-2589 Cleanup pass to address function naming, capitalization rules, change Qpid messaging 'list' representation from List<> to Collection<>,
some exception cleanup.
Patch from Chuck Rolke
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@952968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.recevier.cs | 21 |
1 files changed, 10 insertions, 11 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 9a425c03b7..41ed9f30b5 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 @@ -21,16 +21,15 @@ using System;
using System.Collections.Generic;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
-namespace org.apache.qpid.messaging.examples
+namespace Org.Apache.Qpid.Messaging.examples
{
class MapReceiver
{
static void Main(string[] args)
{
string url = "amqp:tcp:localhost:5672";
-// string url = "10.16.18.254:5672";
if (args.Length > 0)
url = args[0];
@@ -38,37 +37,37 @@ namespace org.apache.qpid.messaging.examples // Create and open an AMQP connection to the broker URL
//
Connection connection = new Connection(url);
- connection.open();
+ connection.Open();
//
// Create a session and a receiver fir the direct exchange using the
// routing key "map_example".
//
- Session session = connection.createSession();
- Receiver receiver = session.createReceiver("amq.direct/map_example");
+ Session session = connection.CreateSession();
+ Receiver receiver = session.CreateReceiver("amq.direct/map_example");
//
// Fetch the message from the broker (wait indefinitely by default)
//
- Message message = receiver.fetch(new Duration(60000));
+ Message message = receiver.Fetch(new Duration(60000));
//
// Extract the structured content from the message.
//
Dictionary<string, object> content = new Dictionary<string, object>();
- message.getContent(content);
+ message.GetContent(content);
Console.WriteLine("Received: {0}", content);
//
// Acknowledge the receipt of all received messages.
//
- session.acknowledge();
+ session.Acknowledge();
//
// Close the receiver and the connection.
//
- receiver.close();
- connection.close();
+ receiver.Close();
+ connection.Close();
}
}
}
|
