public RequestParam(XmlNode xnRequestParam) { switch (xnRequestParam.Attributes["type"].Value) { case "string": this.type = RequestParamType.STRING; break; case "int": this.type = RequestParamType.INT; break; case "bool": this.type = RequestParamType.BOOL; break; default: this.type = RequestParamType.DEFAULT; break; } this.compulsory = xnRequestParam.Attributes["compulsory"].Value == "true" ? true : false; this.paramName = xnRequestParam.SelectSingleNode("paramname").InnerText; this.paramInstruction = xnRequestParam.SelectSingleNode("paramInstruction").InnerText; }
public RequestParam(string key, string value, RequestParamType type) { Key = key; Value = value; Type = type; }