123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Reflection;
- using System.ServiceModel;
- using Aitex.Core.RT.Log;
- using Aitex.Core.RT.OperationCenter;
- namespace MECF.Framework.Common.OperationCenter
- {
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
- public class InvokeService : IInvokeService
- {
- public void DoOperation(string operationName, params object[] args)
- {
- try
- {
- //if (KeyManager.Instance.IsExpired)
- //{
- // EV.PostMessage("System", EventEnum.DefaultWarning, "Software is expired. Can not do the operation");
- // return;
- //}
- string argsList = "";
- if (args.Length > 0)
- {
- foreach (object arg in args)
- {
- argsList += (" " + arg.ToString());
- }
- }
- LOG.WriteLog(eEvent.EV_DEVICE_INFO, "", $"{operationName} was execute,parameter :{argsList}");
- OP.DoOperation(operationName, args);
- }
- catch (Exception ex)
- {
- LOG.WriteExeption(string.Format("调用{0},碰到未处理的WCF操作异常", operationName), ex);
- }
- }
- }
- }
|