// Load common links, such as those for UnlockComponent, from appData\apiManager\commonLinks.xml private bool integrateCommonLinks(Chilkat.Log log) { // No need for refdoc links if we're not using this code for refdoc generation. if (AppData.GitHubCodeBase) { return(true); } Chilkat.Xml xmlCommon = new Chilkat.Xml(); if (!xmlCommon.LoadXmlFile(AppData.BaseDir + "/appData/apiManager/commonLinks.xml")) { log.LogError("Failed to load commonLinks.xml"); return(false); } int i; int n = xmlCommon.NumChildren; string strName = null; for (i = 0; i < n; i++) { xmlCommon.GetChild2(i); strName = xmlCommon.GetAttrValue("name"); if ((strName != null) && xmlCommon.HasChildWithTag("links2")) { if (xmlCommon.TagEquals("method")) { XMethod method = GetMethodByName(strName); if (method != null) { xmlCommon.FindChild2("links2"); method.CopyLinks(xmlCommon); xmlCommon.GetParent2(); } } else if (xmlCommon.TagEquals("property")) { XProperty prop = GetPropertyByName(strName); if (prop != null) { xmlCommon.FindChild2("links2"); prop.CopyLinks(xmlCommon); xmlCommon.GetParent2(); } } } xmlCommon.GetParent2(); } return(true); }
// Load common links, such as those for UnlockComponent, from C:\ck2000\appData\apiManager\commonLinks.xml private bool integrateCommonLinks(Chilkat.Log log) { Chilkat.Xml xmlCommon = new Chilkat.Xml(); if (!xmlCommon.LoadXmlFile(PATH_COMMON_LINKS_XML)) { log.LogError("Failed to load commonLinks.xml"); return(false); } int i; int n = xmlCommon.NumChildren; string strName = null; for (i = 0; i < n; i++) { xmlCommon.GetChild2(i); strName = xmlCommon.GetAttrValue("name"); if ((strName != null) && xmlCommon.HasChildWithTag("links2")) { if (xmlCommon.TagEquals("method")) { XMethod method = GetMethodByName(strName); if (method != null) { xmlCommon.FindChild2("links2"); method.CopyLinks(xmlCommon); xmlCommon.GetParent2(); } } else if (xmlCommon.TagEquals("property")) { XProperty prop = GetPropertyByName(strName); if (prop != null) { xmlCommon.FindChild2("links2"); prop.CopyLinks(xmlCommon); xmlCommon.GetParent2(); } } } xmlCommon.GetParent2(); } return(true); }
// xml contains <args2> ... </args2> public MethodArgs(Chilkat.Xml xml) { m_xml = xml; if (xml == null) { return; } m_args = new ArrayList(); int numArgs = xml.NumChildren; for (int i = 0; i < numArgs; i++) { xml.GetChild2(i); MethodArg arg = new MethodArg(); arg.LoadArgXml(xml); m_args.Add(arg); xml.GetParent2(); } }