InvokeService.cs 946 B

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