/// <summary>Writes documentation for this function by adding to the list of documentation tags.</summary> /// <param name="tags">The list of tags to add to.</param> /// <param name="headingLevel">The level (e.g. H2) of the headings.</param> /// <param name="indent">The level of indentation 1, 2, 3 etc.</param> public override void Document(List <AutoDocumentation.ITag> tags, int headingLevel, int indent) { // write memos. foreach (IModel memo in Apsim.Children(this, typeof(Memo))) { memo.Document(tags, -1, indent); } // get description and units. string description = AutoDocumentation.GetDescription(Parent, Name); if (description != string.Empty) { tags.Add(new AutoDocumentation.Paragraph(description, indent)); } tags.Add(new AutoDocumentation.Paragraph("<i>" + Name + "</i> is calculated as a function of <i>" + StringUtilities.RemoveTrailingString(XProperty, ".Value()") + "</i>", indent)); tags.Add(new AutoDocumentation.Paragraph("<i>Trigger value" + XTrigger.ToString() + " Gradient " + Slope.ToString() + "</i>", indent)); }
/// <summary>Writes documentation for this function by adding to the list of documentation tags.</summary> /// <param name="tags">The list of tags to add to.</param> /// <param name="headingLevel">The level (e.g. H2) of the headings.</param> /// <param name="indent">The level of indentation 1, 2, 3 etc.</param> public void Document(List <AutoDocumentation.ITag> tags, int headingLevel, int indent) { if (IncludeInDocumentation) { // write memos. foreach (IModel memo in this.FindAllChildren <Memo>()) { AutoDocumentation.DocumentModel(memo, tags, headingLevel + 1, indent); } // get description and units. string description = AutoDocumentation.GetDescription(Parent, Name); if (description != string.Empty) { tags.Add(new AutoDocumentation.Paragraph(description, indent)); } tags.Add(new AutoDocumentation.Paragraph("<i>" + Name + "</i> is calculated as a function of <i>" + StringUtilities.RemoveTrailingString(XProperty, ".Value()") + "</i>", indent)); tags.Add(new AutoDocumentation.Paragraph("<i>Trigger value" + XTrigger.ToString() + " Gradient " + Slope.ToString() + "</i>", indent)); } }