Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DefinitionList.cs
1using System.Collections.Generic;
2using System.Threading.Tasks;
4
6{
11 {
17 public DefinitionList(MarkdownDocument Document, IEnumerable<MarkdownElement> Children)
18 : base(Document, Children)
19 {
20 }
21
28 : base(Document, Children)
29 {
30 }
31
36 public override Task Render(IRenderer Output) => Output.Render(this);
37
41 public override bool OutsideParagraph => true;
42
46 internal override bool JoinOverParagraphs => true;
47
51 public override bool InlineSpanElement => false;
52
57 public override void AddChildren(IEnumerable<MarkdownElement> NewChildren)
58 {
59 MarkdownElement Last;
60
61 foreach (MarkdownElement E in NewChildren)
62 {
63 if (!((Last = this.LastChild) is null) && Last is MarkdownElementChildren MarkdownElementChildren && Last.GetType() == E.GetType())
65 else
66 base.AddChildren((IEnumerable<MarkdownElement>)new MarkdownElement[] { E });
67 }
68 }
69
77 public override MarkdownElementChildren Create(IEnumerable<MarkdownElement> Children, MarkdownDocument Document)
78 {
79 return new DefinitionList(Document, Children);
80 }
81
86 public override void IncrementStatistics(MarkdownStatistics Statistics)
87 {
88 Statistics.NrDefinitionLists++;
89 Statistics.NrLists++;
90 }
91
92 }
93}
Contains a markdown document. This markdown document class supports original markdown,...
Contains some basic statistical information about a Markdown document.
int NrDefinitionLists
Number of definition lists.
Abstract base class for block elements with children.
Represents a definition list in a markdown document.
DefinitionList(MarkdownDocument Document, IEnumerable< MarkdownElement > Children)
Represents a definition list in a markdown document.
DefinitionList(MarkdownDocument Document, params MarkdownElement[] Children)
Represents a definition list in a markdown document.
override bool InlineSpanElement
If the element is an inline span element.
override bool OutsideParagraph
If element, parsed as a span element, can stand outside of a paragraph if alone in it.
override void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
override MarkdownElementChildren Create(IEnumerable< MarkdownElement > Children, MarkdownDocument Document)
Creates an object of the same type, and meta-data, as the current object, but with content defined by...
override Task Render(IRenderer Output)
Renders the element.
override void AddChildren(IEnumerable< MarkdownElement > NewChildren)
Adds children to the element.
Abstract base class for all markdown elements with a variable number of child elements.
override IEnumerable< MarkdownElement > Children
Any children of the element.
MarkdownElement LastChild
Last child, or null if none.
void AddChildren(params MarkdownElement[] NewChildren)
Adds children to the element.
Abstract base class for all markdown elements.
MarkdownDocument Document
Markdown document.
Interface for Markdown renderers.
Definition: IRenderer.cs:12