コード例 #1
0
        private static IList <MethodAroundBizModel> GetPluginConfigure(AddinConfigureEntityKey entityKey)
        {
            if (!_inited)
            {
                return(null);
            }

            var bizModel = AddinCache.GetDeployedCfgList(entityKey.GetKey());

            if (bizModel.Count != 0)
            {
                return(bizModel);
            }

            if (AddinOperator.CurrentUserIsOperator())
            {
                //如果是未发布,但是测试人员可以进行测试
                bizModel = AddinCache.GetCfgList(entityKey.GetKey());
            }
            return(bizModel);
        }
コード例 #2
0
        /// <summary>
        /// 取得缓存对象列表
        /// </summary>
        /// <returns></returns>
        public static IList <MethodAroundBizModel> GetCfgList(string key)
        {
            IList <MethodAroundBizModel> models = new List <MethodAroundBizModel>();;

            foreach (var item in _allconfigures.Keys)
            {
                var data = _allconfigures[item];
                AddinConfigureEntityKey entityKey = new AddinConfigureEntityKey
                                                        (data.MstModel.TargetClassName, data.MstModel.TargetMethodName, data.MstModel.InterceptorType);

                if (entityKey.GetKey() == key)
                {
                    models.Add(data);
                }
            }
            return(models);
        }
コード例 #3
0
        public static void SaveServiceRequestParam(AddinMethodInvocation invocation)
        {
            var    requestParams = RequestParams();
            string className     = invocation.Target.ToString();
            string method        = invocation.Method.Name;

            AddinConfigureEntityKey entityKey = new AddinConfigureEntityKey(className, method, EnumInterceptorType.None);

            foreach (string param in requestParams)
            {
                //key
                string key = entityKey.GetKey() + "_" + param;
                ServiceUIParamBizModel model = new ServiceUIParamBizModel {
                    ClassName = className, MethodName = method, ParamName = param, ParamValue = requestParams[param]
                };
                AddinCache.AddUIParam(key, model);
            }
        }