static void GetCompression(XmlNode xNode) { // loop thru looking to process all the datasource elements string cm = null; string cn = null; string fn = null; bool bEnable = true; foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "CodeModule": if (xNodeLoop.InnerText.Length > 0) { cm = xNodeLoop.InnerText; } break; case "ClassName": if (xNodeLoop.InnerText.Length > 0) { cn = xNodeLoop.InnerText; } break; case "Finish": if (xNodeLoop.InnerText.Length > 0) { fn = xNodeLoop.InnerText; } break; case "Enable": if (xNodeLoop.InnerText.ToLower() == "false") { bEnable = false; } break; } } if (bEnable) { _Compression = new CompressionConfig(cm, cn, fn); } else { _Compression = null; } }
static void GetCompression(XmlNode xNode) { // loop thru looking to process all the datasource elements string cm = null; string cn = null; string fn = null; bool bEnable = true; foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) continue; switch (xNodeLoop.Name) { case "CodeModule": if (xNodeLoop.InnerText.Length > 0) cm = xNodeLoop.InnerText; break; case "ClassName": if (xNodeLoop.InnerText.Length > 0) cn = xNodeLoop.InnerText; break; case "Finish": if (xNodeLoop.InnerText.Length > 0) fn = xNodeLoop.InnerText; break; case "Enable": if (xNodeLoop.InnerText.ToLower() == "false") bEnable = false; break; } } if (bEnable) _Compression = new CompressionConfig(cm, cn, fn); else _Compression = null; }