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 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); }
public void InsertArg(int insertIndex, string argName, string objcName, string genericType) { //<args2> // <arg name="encodedBytes" type="string" objcName="encodedBytes" /> // <arg name="encoding" type="string" objcName="encoding" /> //</args2> // Build the XML <arg> and insert it. Chilkat.Xml xArg = new Chilkat.Xml(); xArg.Tag = "arg"; xArg.AddAttribute("name", argName); xArg.AddAttribute("type", genericType); xArg.AddAttribute("objcName", objcName); m_xml.InsertChildTreeBefore(insertIndex, xArg); MethodArg arg = new MethodArg(); arg.LoadArgXml(xArg); m_args.Insert(insertIndex, arg); return; }
public string GetAxId(XClass xclass) { if (m_axId != 0) { return(m_axId.ToString()); } if (!m_xml.HasAttribute("axId")) { string nextAxId = xclass.AxNextId; m_xml.AddAttribute("axId", nextAxId); xclass.IncrementAxNextId(); } string s = m_xml.GetAttrValue("axId"); m_axId = Convert.ToInt32(s); return(s); }