private static DocItem DocumentTable(BindTable table, string prefix, int curLevel) { DocItem doc = new DocItem(DocItemType.Table, typeof(Table), table.Name, prefix + table.Name, prefix + table.Name, prefix + table.Name); if (curLevel > MaxRecursion) { doc.SubDocs.Add(new DocItem(DocItemType.None, typeof(void), "Max Recursion Reached", "Max Recursion Reached", "Max Recursion Reached", "", "", "")); return(doc); } var nextPrefix = prefix + table.Name + "."; //var items = table.GetAllItems(); //Functions foreach (var item in table.bindFunctions.Values) { var docItem = DocumentFunction(item, nextPrefix); if (docItem != null) { doc.SubDocs.Add(docItem); } } //Types foreach (var item in table.bindTypes.Values) { var docItem = DocumentType(item, nextPrefix, curLevel + 1); if (docItem != null) { doc.SubDocs.Add(docItem); } } //Enums foreach (var item in table.bindEnums.Values) { var docItem = DocumentEnum(item, nextPrefix); if (docItem != null) { doc.SubDocs.Add(docItem); } } //User Objects foreach (var item in table.bindObjects.Values) { var docItem = DocumentObject(item, nextPrefix, curLevel + 1); if (docItem != null) { doc.SubDocs.Add(docItem); } } //Tables last foreach (var item in table.bindTables.Values) { //Add to prefix var documentTable = DocumentTable(item, nextPrefix, curLevel + 1); if (documentTable != null) { doc.SubDocs.Add(documentTable); } } return(doc); }
public void SetBindTable(BindTable bindTable) => this.m_bindings = bindTable;