public override void SetParamters(byte[] objParamters) { BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters)); if (m_pFieldPara != null) { m_pFieldPara = null; } m_pFieldPara = new RuleExpression.LRFieldCheckPara(); pParameter.BaseStream.Position = 0; int nCount1 = pParameter.ReadInt32(); m_pFieldPara.m_bCode = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bDecimal = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bLength = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bName = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bNull = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bType = Convert.ToBoolean(pParameter.ReadInt32()); //解析字符串 int nSize = sizeof(int) * 7; Byte[] bb = new byte[nCount1 - nSize]; pParameter.Read(bb, 0, nCount1 - nSize); string para_str = Encoding.Default.GetString(bb); para_str.Trim(); string[] strResult = para_str.Split('|'); int i = 0; m_pFieldPara.strAlias = strResult[i++]; m_pFieldPara.strRemark = strResult[i++]; m_pFieldPara.m_LyrFldMap = new List <string>(); for (int j = i; j < strResult.Length; j++) { m_pFieldPara.m_LyrFldMap.Add(strResult[j]); } }
public override void SetParamters(byte[] objParamters) { BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters)); if (m_pFieldPara != null) { m_pFieldPara = null; } m_pFieldPara = new RuleExpression.LRFieldCheckPara(); pParameter.BaseStream.Position = 0; int nCount1 = pParameter.ReadInt32(); m_pFieldPara.m_bCode = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bDecimal = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bLength = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bName = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bNull = Convert.ToBoolean(pParameter.ReadInt32()); m_pFieldPara.m_bType = Convert.ToBoolean(pParameter.ReadInt32()); //�����ַ��� int nSize = sizeof(int) * 7; Byte[] bb = new byte[nCount1 - nSize]; pParameter.Read(bb, 0, nCount1 - nSize); string para_str = Encoding.Default.GetString(bb); para_str.Trim(); string[] strResult = para_str.Split('|'); int i = 0; m_pFieldPara.strAlias = strResult[i++]; m_pFieldPara.strRemark = strResult[i++]; m_pFieldPara.m_LyrFldMap = new List<string>(); for (int j = i; j < strResult.Length; j++) { m_pFieldPara.m_LyrFldMap.Add(strResult[j]); } }