41 this.children.
Add(NewChild);
104 internal virtual bool JoinOverParagraphs =>
false;
114 if (!Callback(
this, State))
117 if (!(this.children is
null))
122 while (!(Loop is
null))
124 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
126 if (!Loop[i].
ForEach(Callback, State))
147 IEnumerator<MarkdownElement> e1 =
null;
148 IEnumerator<MarkdownElement> e2 =
null;
153 e2 = x.children.GetEnumerator();
168 if (!e1.Current.Equals(e2.Current))
187 int h1 = base.GetHashCode();
190 while (!(Loop is
null))
192 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
194 h2 = Loop[i].GetHashCode();
195 h1 = ((h1 << 5) + h1) ^ h2;
Contains a markdown document. This markdown document class supports original markdown,...
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.
MarkdownElementChildren(MarkdownDocument Document, ChunkedList< MarkdownElement > Children)
Abstract base class for all markdown elements with a variable number of child elements.
bool HasFirstChild
If there is a first item.
void SetChildren(ChunkedList< MarkdownElement > Children)
Sets the children of the node.
override int GetHashCode()
Serves as the default hash function.
override ChunkedList< MarkdownElement > Children
Any children of the element.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
MarkdownElementChildren(MarkdownDocument Document, params MarkdownElement[] Children)
Abstract base class for all markdown elements with a variable number of child elements.
virtual void AddChild(MarkdownElement NewChild)
Adds a child to the element.
override bool ForEach(MarkdownElementHandler Callback, object State)
Loops through all child-elements for the element.
bool HasLastChild
If there is a last item.
bool HasOneChild
If the element has only one child.
abstract 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...
MarkdownElement FirstChild
First child, or null if none.
Abstract base class for all markdown elements.
MarkdownDocument Document
Markdown document.
Node referencing a chunk in a ChunkedList<T>
ChunkNode< T > Next
Next chunk
int Pos
Index after the last element in chunk.
int Start
Index of first element in chunk.
A chunked list is a linked list of chunks of objects of type T .
IEnumerator< T > GetEnumerator()
Returns an enumerator for the collection.
T LastItem
Last item in the collection.
void AddRange(IEnumerable< T > Collection)
Adds a range of elements (last) to the list.
ChunkNode< T > FirstChunk
First chunk
bool HasFirstItem
If there is a first item in the collection
bool HasLastItem
If there is a last item in the collection
T FirstItem
First item in the collection.
void Add(T Item)
Adds an item to the collection.
delegate bool MarkdownElementHandler(MarkdownElement Element, object State)
Delegate for markdown element callback methods.