1using System.Collections.Generic;
2using System.Threading.Tasks;
11 private IEnumerable<MarkdownElement> children;
41 this.
AddChildren((IEnumerable<MarkdownElement>)NewChildren);
48 public virtual void AddChildren(IEnumerable<MarkdownElement> NewChildren)
50 if (!(this.children is LinkedList<MarkdownElement>
Children))
52 Children =
new LinkedList<MarkdownElement>();
118 public override IEnumerable<MarkdownElement>
Children => this.children;
141 internal virtual bool JoinOverParagraphs =>
false;
151 if (!Callback(
this, State))
154 if (!(this.children is
null))
158 if (!E.
ForEach(Callback, State))
176 IEnumerator<MarkdownElement> e1 = this.children.GetEnumerator();
177 IEnumerator<MarkdownElement> e2 = x.children.GetEnumerator();
191 if (!e1.Current.Equals(e2.Current))
202 int h1 = base.GetHashCode();
208 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.
void SetChildren(IEnumerable< MarkdownElement > Children)
Sets the children of the node.
override IEnumerable< MarkdownElement > Children
Any children of the element.
MarkdownElement LastChild
Last child, or null if none.
abstract 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 int GetHashCode()
Serves as the default hash function.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
void AddChildren(params MarkdownElement[] NewChildren)
Adds children to the element.
MarkdownElementChildren(MarkdownDocument Document, params MarkdownElement[] Children)
Abstract base class for all markdown elements with a variable number of child elements.
override bool ForEach(MarkdownElementHandler Callback, object State)
Loops through all child-elements for the element.
virtual void AddChildren(IEnumerable< MarkdownElement > NewChildren)
Adds children to the element.
MarkdownElementChildren(MarkdownDocument Document, IEnumerable< MarkdownElement > Children)
Abstract base class for all markdown elements with a variable number of child elements.
bool HasOneChild
If the element has only one child.
MarkdownElement FirstChild
First child, or null if none.
Abstract base class for all markdown elements.
virtual bool ForEach(MarkdownElementHandler Callback, object State)
Loops through all child-elements for the element.
override int GetHashCode()
Serves as the default hash function.
MarkdownDocument Document
Markdown document.
delegate bool MarkdownElementHandler(MarkdownElement Element, object State)
Delegate for markdown element callback methods.