Undecorated source

HelloWorld.cs

 1 using System;
 2 using Amqp;
 3 
 4 namespace HelloWorld
 5 {
 6   class HelloWorld
 7   {
 8     static void Main(string[] args)
 9     {
10       string brokerUrl = "amqp://localhost:5672";
11       string address   = "my_queue";
12 
13       Address    brokerAddr = new Address(brokerUrl);
14       Connection connection = new Connection(brokerAddr);
15       Session    session    = new Session(connection);
16 
17       SenderLink   sender   = new   SenderLink(session, "sender",   address);
18       ReceiverLink receiver = new ReceiverLink(session, "receiver", address);
19 
20       Message helloOut = new Message("Hello World!");
21       sender.Send(helloOut);
22 
23       Message helloIn = receiver.Receive();
24       receiver.Accept(helloIn);
25 
26       Console.WriteLine(helloIn.Body.ToString());
27 
28       receiver.Close();
29       sender.Close();
30       session.Close();
31       connection.Close();
32     }
33   }
34 }