/// <summary> /// 从文本段填充数据集参数 /// </summary> /// <param name="keyValues">文本段字典</param> /// <param name="parameter">需要完善的参数</param> protected override void FillParameterFromTextSegment(Dictionary <string, string> keyValues, FCSFileParameter parameter) { base.FillParameterFromTextSegment(keyValues, parameter); if (keyValues.ContainsKey(Keys.ModeKey) && ModeConvert.ConvertToEnum(keyValues[Keys.ModeKey]) != Mode.L) { throw new Exception("Can't analyse,mode must be L"); } }
/// <summary> /// 从文本段填充数据集参数 /// </summary> /// <param name="keyValues">文本段字典</param> /// <param name="parameter">需要完善的参数</param> protected override void FillParameterFromTextSegment(Dictionary <string, string> keyValues, FCSFileParameter parameter) { base.FillParameterFromTextSegment(keyValues, parameter); if (keyValues.ContainsKey(Keys.ModeKey) && ModeConvert.ConvertToEnum(keyValues[Keys.ModeKey]) != Mode.L) { throw new Exception("Can't analyse,mode must be L"); } if (keyValues.ContainsKey(Keys.ByteOrdKey) && ByteOrderConvert.ConvertToEnum(keyValues[Keys.ByteOrdKey]) == ByteOrd.Unknown) { throw new Exception("Can't analyse,byteord not supported"); } if (keyValues.ContainsKey(Keys.UnicodeKey) && !"UTF-8".Equals(keyValues[Keys.UnicodeKey].ToUpper()) && !"UTF8".Equals(keyValues[Keys.UnicodeKey].ToUpper())) { throw new Exception("Can't analyse,unicode must be utf-8"); } }