Program.cs 553 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Threading;
  3. namespace ConsoleAppDotNet
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. string input = Console.ReadLine();
  10. if (input == null)
  11. return;
  12. input = input.Trim();
  13. if (input == string.Empty)
  14. return;
  15. // Pretend to do some work.
  16. Thread.Sleep(TimeSpan.FromSeconds(5));
  17. // Return JSON.
  18. Console.Write("{{\"Input\": \"{0}\", \"Output\":\"blah!\"}}", input);
  19. }
  20. }
  21. }