Cgw.SmcError.ErrorInfo.GetErrorInfo C# (CSharp) Method

GetErrorInfo() public method

取出字典{标识符,标识符替代值}
public GetErrorInfo ( DelegateGetErrorDesc delegateHandler, int langId, string errDesc ) : string>.Dictionary
delegateHandler DelegateGetErrorDesc 委托数据库取描述字串
langId int 语种ID
errDesc string 带格式的错误描述,需补充参数
return string>.Dictionary
        public virtual Dictionary<string, string> GetErrorInfo(DelegateGetErrorDesc delegateHandler, int langId, string errDesc)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();

            //提取描述格式中的参数
            List<SignStruct> properties = this.GetProperties(errDesc);

            //根据参数名,从Dictionary中取值
            foreach (SignStruct o in properties)
            {
                //标识符序号
                int num = Convert.ToInt32(o.number);
                ////标识符名称
                string sign = o.sign;
                //初始化该字典项为“”;
                dictionary[o.data] = string.Empty;
                //嵌套错误码
                if (sign.Equals(err))
                {
                    //将标识符与错误描述填入字典中
                    if (this.ExternErrs.Count > num)
                    {
                        dictionary[o.data] = this.ExternErrs[num].ToFomatedErrDesc(langId);
                    }

                    continue;
                }

                //统一按名称匹配,暂时不处理名称一样,有多个索引的问题
                foreach (List<ValueDictionary> valueList in this.ParametersDictionary)
                {
                    if (valueList == null)
                    {
                        continue;
                    }

                    foreach (ValueDictionary valueDic in valueList)
                    {
                        if (sign.Equals(valueDic.Name))
                        {
                            dictionary[o.data] = valueDic.Value;
                            break;
                        }
                    }
                }
            }

            return dictionary;
        }