You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Program.cs 787 B

4 years ago
123456789101112131415161718192021222324252627
  1. using Nancy.Hosting.Self;
  2. using System;
  3. using System.Configuration;
  4. namespace Learun.Application.WorkFlowServer
  5. {
  6. /// <summary>
  7. /// 程序入口
  8. /// </summary>
  9. class Program
  10. {
  11. /// <summary>
  12. /// 入口函数
  13. /// </summary>
  14. /// <param name="args"></param>
  15. static void Main(string[] args)
  16. {
  17. string serverUrl = ConfigurationManager.AppSettings["workflowService"].ToString();
  18. var nancyHost = new NancyHost(new Uri(serverUrl));
  19. nancyHost.Start();
  20. Console.WriteLine("工作流引擎服务监听在 " + serverUrl + ". Press enter to stop");
  21. Console.ReadKey();
  22. nancyHost.Stop();
  23. Console.WriteLine("服务停止.谢谢!");
  24. }
  25. }
  26. }