ServiceSetting.cs 944 B

12345678910111213141516171819202122232425262728293031323334
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:ServiceSetting
  3. * 作者:xulisong
  4. * 创建时间: 2019/1/18 11:05:09
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Xml;
  14. using SAGA.DotNetUtils;
  15. using SAGA.DotNetUtils.Service;
  16. namespace SAGA.RevitUtils.ExtendInterface
  17. {
  18. public class ServiceSetting
  19. {
  20. /// <summary>
  21. /// 加载默认服务
  22. /// </summary>
  23. public static void LoadServices()
  24. {
  25. string fileName = Path.Combine(AppBaseInfo.AppRunPath, @"MBIResource\Services\Services.xml");
  26. if (File.Exists(fileName))
  27. {
  28. ServiceLocator.Current.LoadServices(fileName);
  29. }
  30. }
  31. }
  32. }