public RefdocLink CreateNewLink(int insertIndex, string linkUrl, string linkText, string linkType, bool bIsAsync) { if (m_xml == null) { m_xml = new Chilkat.Xml(); m_xml.Tag = "links2"; } Chilkat.Xml xLink = new Chilkat.Xml(); xLink.Tag = "link"; xLink.NewChild2("url", linkUrl); xLink.NewChild2("text", linkText); xLink.AddAttribute("linkType", linkType); if (bIsAsync) { xLink.AddAttribute("async", "1"); } m_xml.InsertChildTreeBefore(insertIndex, xLink); RefdocLink link = new RefdocLink(xLink); m_links.Insert(insertIndex, link); return(link); }
public XClass() { m_xml.Tag = "class"; m_xml.Encoding = "utf-8"; m_xml.NewChild2("methods", ""); m_xml.NewChild2("properties", ""); m_xml.NewChild2("events", ""); }
public void InitNewMethod(string name) { m_xml = new Chilkat.Xml(); m_xml.Tag = "method"; m_xml.AddAttribute("name", name); m_xml.NewChild2("gType", "void"); m_xml.NewChild2("descrip", ""); Chilkat.Xml xArgs = m_xml.NewChild("args2", ""); m_name = name; m_methodArgs = new MethodArgs(xArgs); }
public void initNewProperty(string name) { m_xml = new Chilkat.Xml(); m_xml.Tag = "property"; m_xml.AddAttribute("name", name); m_xml.NewChild2("gType", "bool"); m_xml.NewChild2("descrip", ""); m_xml.UpdateAttribute("read", "1"); m_xml.UpdateAttribute("write", "1"); Chilkat.Xml xArgs = m_xml.NewChild("args2", ""); m_name = name; m_methodArgs = new MethodArgs(xArgs); }
// creates the lowercase method for this string property. // if this property is not a string, then returns null. public XMethod ToLowerCaseStringMethod() { if (m_gt != ChilkatTypes.GT_STRING) { return(null); } // If this is a string property, then create an XMethod object // from the xProp that is the lowercase name returning a string with no args. XMethod xLowerCaseProp = new XMethod(); Chilkat.Xml x = cloneEntryXml(); if (x == null) { return(null); } x.Tag = "method"; string strName = StringUtil.ToLowerFirstChar(x.GetAttrValue("name")); x.UpdateAttribute("name", strName); // The "cppType" child (return type for the method) must change from "CkString &" to "const char *" //x.UpdateChildContent("cppType", "const char *"); x.NewChild2("args2", ""); xLowerCaseProp.IsLowercaseAlt = true; // Set IsLowercaseAlt before loading the XML... xLowerCaseProp.LoadMethodXml(x); return(xLowerCaseProp); }