} // _recurseBulkEditData() private static void _addNodeToData(CswNbtMetaDataNodeType NodeType, CswNbtNode Node, BulkEditDownload ret, BulkEditParams Params) { DataRow row = ret.CsvData.NewRow(); row["nodeid"] = Node.NodeId.ToString(); foreach (Int32 PropId in Params.PropIds) { CswNbtMetaDataNodeTypeProp Prop = NodeType.getNodeTypeProp(PropId); if (Prop.getFieldTypeRule().SubFields.Count > 1) { foreach (CswNbtSubField SubField in Prop.getFieldTypeRule().SubFields) { row[Prop.PropName + " " + SubField.Name] = Node.Properties[Prop].GetSubFieldValue(SubField); } } else { row[Prop.PropName] = Node.Properties[Prop].GetSubFieldValue(Prop.getFieldTypeRule().SubFields.Default); } } ret.CsvData.Rows.Add(row); } // _addNodeToData()
} // DownloadBulkEditData() private static void _recurseBulkEditData(CswNbtMetaDataNodeType NodeType, ICswNbtTree Tree, BulkEditDownload ret, BulkEditParams Params) { for (Int32 n = 0; n < Tree.getChildNodeCount(); n++) { Tree.goToNthChild(n); if (Tree.getNodeKeyForCurrentPosition().NodeTypeId == Params.NodeTypeId) { _addNodeToData(NodeType, Tree.getCurrentNode(), ret, Params); } _recurseBulkEditData(NodeType, Tree, ret, Params); Tree.goToParentNode(); } } // _recurseBulkEditData()