Program.cs 832 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) 2012-2020 fo-dicom contributors.
  2. // Licensed under the Microsoft Public License (MS-PL).
  3. using Dicom.Log;
  4. using System;
  5. namespace QueryRetrieve_SCP
  6. {
  7. internal static class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. // Initialize log manager.
  12. LogManager.SetImplementation(ConsoleLogManager.Instance);
  13. int tmp;
  14. var port = args != null && args.Length > 0 && int.TryParse(args[0], out tmp) ? tmp : 8001;
  15. Console.WriteLine($"Starting QR SCP server with AET: QRSCP on port {port}");
  16. QRServer.Start(port, "QRSCP");
  17. Console.WriteLine("Press any key to stop the service");
  18. Console.Read();
  19. Console.WriteLine("Stopping QR service");
  20. QRServer.Stop();
  21. }
  22. }
  23. }