Program.cs 840 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 Worklist_SCP
  6. {
  7. public class Program
  8. {
  9. protected Program()
  10. {
  11. }
  12. static void Main(string[] args)
  13. {
  14. // Initialize log manager.
  15. LogManager.SetImplementation(ConsoleLogManager.Instance);
  16. var port = args != null && args.Length > 0 && int.TryParse(args[0], out int tmp) ? tmp : 8005;
  17. Console.WriteLine($"Starting QR SCP server with AET: QRSCP on port {port}");
  18. WorklistServer.Start(port, "QRSCP");
  19. Console.WriteLine("Press any key to stop the service");
  20. Console.Read();
  21. Console.WriteLine("Stopping QR service");
  22. WorklistServer.Stop();
  23. }
  24. }
  25. }