public static ParamInfo GetGlobalParamData(IDictionary <string, object> queryParams, string key) { var keyArray = key.Split('_'); var realKey = keyArray[1]; var data = SqlEnginerConfig.GetGlobalDatas(realKey); if (data == null) { throw new ArgumentNullException(string.Concat("不存在", realKey, "全局对象!")); } object outData = null; if (!queryParams.TryGetValue(key, out outData)) { var convertData = CovnertParam(data, queryParams, realKey); if (convertData != data) { queryParams.Add(key, convertData); data = convertData; } } else { data = outData; } return(new ParamInfo { Type = ParamType.Global, Name = key, Data = data }); }
public ParamInfo GetParamInfo(IContext context, string dataStr) { var key = dataStr.Substring(1, dataStr.Length - 1); var keyArray = dataStr.Split('_'); var realKey = keyArray[1]; var data = SqlEnginerConfig.GetGlobalDatas(realKey); if (data == null) { throw new ArgumentNullException(string.Concat("不存在", realKey, "全局对象!")); } var queryParams = context.Params; object outData; if (!queryParams.TryGetValue(key, out outData)) { var convertData = ParamsUtil.CovnertParam(data, queryParams, realKey); if (convertData != data) { queryParams.Add(key, convertData); data = convertData; } } else { data = outData; } return(new ParamInfo { Type = ParamType.Global, Name = key, Data = data }); }