public GShare.ErrorCode Initialize(string strReq) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(strReq); XmlNode node = xmlDoc.SelectSingleNode("//dra/req"); XmlNamedNodeMap nnMap = node.Attributes; if(nnMap != null) { for (int i = 0; i < nnMap.Count; i++ ) { string attrName = nnMap.Item(i).Name; string attrValue = nnMap.Item(i).Value; if (attrName == "id") m_enRequestId = (GShare.Request)int.Parse(attrValue); else if (attrName == "subid") m_enReqSubId = (GShare.Request)int.Parse(attrValue); else if (attrName == "type") m_enKLineDataType = (GShare.KLineDataType)int.Parse(attrValue); else if (attrName == "mode") m_enParseMode = (GShare.ParseMode)int.Parse(attrValue); else if (attrName == "status") m_enJobStatus = (GShare.JobStatus)int.Parse(attrValue); else if (attrName == "msg") m_strMsg = attrValue; else if (attrName == "parapath") m_strParamPath = attrValue; } } return GShare.ErrorCode.eSuccess; }
public RequestParameter() { m_enJobStatus = GShare.JobStatus.eUndefined; m_enRequestId = GShare.Request.eInvalidRequest; m_enKLineDataType = GShare.KLineDataType.eUndefined; m_enParseMode = GShare.ParseMode.eUndefined; }