InvokeService.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ServiceModel;
  6. using Aitex.Core.RT.Event;
  7. using Aitex.Core.RT.Key;
  8. using Aitex.Triton160.Common.Interface;
  9. using Aitex.Core.RT.OperationCenter;
  10. using Aitex.Core.RT.Log;
  11. namespace Aitex.Triton160.RT.WCF
  12. {
  13. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
  14. public class InvokeService : IInvokeService
  15. {
  16. public void DoOperation(string operationName, params object[] args)
  17. {
  18. try
  19. {
  20. if (KeyManager.Instance.IsExpired)
  21. {
  22. EV.PostMessage("System", EventEnum.DefaultWarning, "Software is expired. Can not do the operation");
  23. return;
  24. }
  25. OP.DoOperation(operationName, args);
  26. }
  27. catch (Exception ex)
  28. {
  29. LOG.Error(string.Format("调用{0},碰到未处理的WCF操作异常", operationName), ex);
  30. }
  31. }
  32. }
  33. }