Beispiel #1
0
        static void Main(string[] args)
        {
            try
            {
                var converter = new MessageConverter();

                Console.WriteLine("Alexandria Echo");

                var input = Console.In.ReadToEnd();

                var message = converter.DeserializeFromJson <Message>(input);

                Console.WriteLine("Message Received");
                Console.WriteLine("Type: {0}", message.Type);
                Console.WriteLine("Header: {0}", message.Header);
                Console.WriteLine("Body: {0}", message.Body);

                //Console.WriteLine("Press Enter to close");
                //Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Message Error: " + ex.Message);
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            try
            {
                var converter = new MessageConverter();

                Console.WriteLine("Alexandria Echo");

                var input = Console.In.ReadToEnd();

                var message = converter.DeserializeFromJson<Message>(input);

                Console.WriteLine("Message Received");
                Console.WriteLine("Type: {0}", message.Type);
                Console.WriteLine("Header: {0}", message.Header);
                Console.WriteLine("Body: {0}", message.Body);

                //Console.WriteLine("Press Enter to close");
                //Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Message Error: " + ex.Message);
            }
        }