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.Threading.Tasks;
4
6{
11 {
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 AddChild(MarkdownElement NewChild)
58 {
59 if (this.HasLastChild &&
61 MarkdownElementChildren.GetType() == NewChild.GetType())
62 {
64 }
65 else
66 base.AddChild(NewChild);
67 }
68
73 public override void AddChildren(ChunkedList<MarkdownElement> NewChildren)
74 {
75 ChunkNode<MarkdownElement> Loop = NewChildren.FirstChunk;
76 int i, c;
77
78 while (!(Loop is null))
79 {
80 for (i = Loop.Start, c = Loop.Pos; i < c; i++)
81 this.AddChild(Loop[i]);
82
83 Loop = Loop.Next;
84 }
85 }
86
95 {
96 return new DefinitionList(Document, Children);
97 }
98
103 public override void IncrementStatistics(MarkdownStatistics Statistics)
104 {
105 Statistics.NrDefinitionLists++;
106 Statistics.NrLists++;
107 }
108
109 }
110}
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, params MarkdownElement[] Children)
Represents a definition list in a markdown document.
override void AddChild(MarkdownElement NewChild)
Adds a child to the element.
override void AddChildren(ChunkedList< MarkdownElement > NewChildren)
Adds children to the element.
DefinitionList(MarkdownDocument Document, ChunkedList< 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 Task Render(IRenderer Output)
Renders the element.
override MarkdownElementChildren Create(ChunkedList< MarkdownElement > Children, MarkdownDocument Document)
Creates an object of the same type, and meta-data, as the current object, but with content defined by...
Abstract base class for all markdown elements with a variable number of child elements.
virtual void AddChildren(ChunkedList< MarkdownElement > NewChildren)
Adds children to the element.
MarkdownElement LastChild
Last child, or null if none.
override ChunkedList< MarkdownElement > Children
Any children of the element.
Abstract base class for all markdown elements.
MarkdownDocument Document
Markdown document.
Node referencing a chunk in a ChunkedList<T>
Definition: ChunkNode.cs:11
ChunkNode< T > Next
Next chunk
Definition: ChunkNode.cs:26
int Pos
Index after the last element in chunk.
Definition: ChunkNode.cs:51
int Start
Index of first element in chunk.
Definition: ChunkNode.cs:46
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54
ChunkNode< T > FirstChunk
First chunk
Definition: ChunkedList.cs:259
Interface for Markdown renderers.
Definition: IRenderer.cs:12