ContainerInline Class

A base class for container for Inline.

public class ContainerInline : Inline, IEnumerable<Inline>, IEnumerable

See also

Inheritance
Inline ContainerInline
Implements

Nested types

NameDescription
ContainerInline.EnumeratorRepresents the Enumerator type.

Constructors

NameDescription
ContainerInline()Initializes a new instance of the ContainerInline class.

ContainerInline()

ContainerInline.cs

Initializes a new instance of the ContainerInline class.

public ContainerInline()

Properties

NameDescription
FirstChildGets the first child.
LastChildGets the last child.
ParentBlockGets the parent block of this inline.

Gets the first child.

public Inline? FirstChild { get; }

Property value

Inline?

Gets the last child.

public Inline? LastChild { get; }

Property value

Inline?

Gets the parent block of this inline.

public LeafBlock? ParentBlock { get; }

Property value

LeafBlock?

Methods

NameDescription
AppendChild(Inline)Appends a child to this container.
Clear()Clears this instance by removing all its children.
ContainsChild(Inline)Checks if this instance contains the specified child.
DumpChildTo(TextWriter, int)Performs the dump child to operation.
EmbraceChildrenBy(ContainerInline)Embraces this instance by the specified container.
FindDescendants<T>()Finds all the descendants.
GetEnumerator()Gets enumerator.
HasValidSpan(bool)Checks whether this container span is valid with respect to child inline spans.
MoveChildrenAfter(Inline)Moves all the children of this container after the specified inline.
OnChildInsert(Inline)Performs the on child insert operation.
OnChildRemove(Inline)Performs the on child remove operation.
System.Collections.Generic.IEnumerable<Meziantou.Framework.Markdown.Syntax.Inlines.Inline>.GetEnumerator()
System.Collections.IEnumerable.GetEnumerator()
TransferChildrenTo(ContainerInline)Transfers all children from this container to destination.
UpdateSpanFromChildren(bool, bool)Updates this container span from its child inline spans.

AppendChild(Inline)

ContainerInline.cs

Appends a child to this container.

public virtual ContainerInline AppendChild(Inline child)

Parameters

child Inline
The child to append to this container..

Returns

ContainerInline This instance

Exceptions

ArgumentNullException
If child is null
ArgumentException
Inline has already a parent

Clears this instance by removing all its children.

public void Clear()

ContainsChild(Inline)

ContainerInline.cs

Checks if this instance contains the specified child.

public bool ContainsChild(Inline childToFind)

Parameters

childToFind Inline
The child to find.

Returns

bool true if this instance contains the specified child; false otherwise

DumpChildTo(TextWriter, int)

ContainerInline.cs

Performs the dump child to operation.

protected override void DumpChildTo(TextWriter writer, int level)

Parameters

writer TextWriter
level int

EmbraceChildrenBy(ContainerInline)

ContainerInline.cs

Embraces this instance by the specified container.

public void EmbraceChildrenBy(ContainerInline container)

Parameters

container ContainerInline
The container to use to embrace this instance.

Exceptions

ArgumentNullException
If the container is null

FindDescendants<T>()

ContainerInline.cs

Finds all the descendants.

public IEnumerable<T> FindDescendants<T>() where T : Inline

Type parameters

T
Type of the descendants to find

Returns

IEnumerable<T> An enumeration of T

GetEnumerator()

ContainerInline.cs

Gets enumerator.

public ContainerInline.Enumerator GetEnumerator()

HasValidSpan(bool)

ContainerInline.cs

Checks whether this container span is valid with respect to child inline spans.

public bool HasValidSpan(bool recursive = false)

Parameters

recursive bool
When true, validates descendant container inline spans recursively.

Returns

bool true when this container span contains all direct child spans and recursive checks (if enabled) succeed; otherwise, false.

MoveChildrenAfter(Inline)

ContainerInline.cs

Moves all the children of this container after the specified inline.

public void MoveChildrenAfter(Inline parent)

Parameters

parent Inline
The parent.

OnChildInsert(Inline)

ContainerInline.cs

Performs the on child insert operation.

protected override void OnChildInsert(Inline child)

Parameters

child Inline

OnChildRemove(Inline)

ContainerInline.cs

Performs the on child remove operation.

protected override void OnChildRemove(Inline child)

Parameters

child Inline

System.Collections.Generic.IEnumerable<Meziantou.Framework.Markdown.Syntax.Inlines.Inline>.GetEnumerator()

ContainerInline.cs

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

ContainerInline.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.

TransferChildrenTo(ContainerInline)

ContainerInline.cs

Transfers all children from this container to destination.

public void TransferChildrenTo(ContainerInline destination)

Parameters

destination ContainerInline
The destination container.

Exceptions

ArgumentNullException
Thrown if destination is null.

UpdateSpanFromChildren(bool, bool)

ContainerInline.cs

Updates this container span from its child inline spans.

public bool UpdateSpanFromChildren(bool recursive = false, bool preserveSelfSpan = true)

Parameters

recursive bool
When true, updates descendant container inline spans recursively before updating this container.
preserveSelfSpan bool
When true, preserves this container current span and only expands it to include children. When false, recomputes from children only.

Returns

bool true when this container span changed; otherwise, false.