Inline Class

Base class for all syntax tree inlines.

public abstract class Inline : MarkdownObject, IMarkdownObject, IInline
Inheritance
MarkdownObject Inline
Implements

Constructors

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

Inline()

Inline.cs

Initializes a new instance of the Inline class.

protected Inline()

Properties

NameDescription
IsClosedGets or sets a value indicating whether this instance is closed.
NextSiblingGets the next sibling inline.
ParentGets the parent container of this inline.
PreviousSiblingGets the previous inline.

IsClosed

Inline.cs

Gets or sets a value indicating whether this instance is closed.

public bool IsClosed { get; set; }

Property value

bool

NextSibling

Inline.cs

Gets the next sibling inline.

public Inline? NextSibling { get; }

Property value

Inline?

Parent

Inline.cs

Gets the parent container of this inline.

public ContainerInline? Parent { get; }

Property value

ContainerInline?

PreviousSibling

Inline.cs

Gets the previous inline.

public Inline? PreviousSibling { get; }

Property value

Inline?

Methods

NameDescription
ContainsParentOfType<T>()Determines whether this instance contains a parent of the specified type.
ContainsParentOrSiblingOfType<T>()Determines whether there is a sibling of the specified type among root-level siblings. This walks up to find the root container, then checks all siblings.
DumpChildTo(TextWriter, int)Performs the dump child to operation.
DumpTo(TextWriter)Dumps this instance to TextWriter.
DumpTo(TextWriter, int)Dumps this instance to TextWriter.
FindBestParent()Performs the find best parent operation.
FindParentOfType<T>()Iterates on parents of the specified type.
FirstParentOfType<T>()Performs the first parent of type t operation.
InsertAfter(Inline)Inserts the specified inline after this instance.
InsertBefore(Inline)Inserts the specified inline before this instance.
OnChildInsert(Inline)Performs the on child insert operation.
OnChildRemove(Inline)Performs the on child remove operation.
Remove()Removes this instance from the current list and its parent
ReplaceBy(Inline, bool)Replaces this inline by the specified inline.

ContainsParentOfType<T>()

Inline.cs

Determines whether this instance contains a parent of the specified type.

public bool ContainsParentOfType<T>() where T : Inline

Type parameters

T
Type of the parent to check

Returns

bool true if this instance contains a parent of the specified type; false otherwise

ContainsParentOrSiblingOfType<T>()

Inline.cs

Determines whether there is a sibling of the specified type among root-level siblings. This walks up to find the root container, then checks all siblings.

public bool ContainsParentOrSiblingOfType<T>() where T : Inline

Type parameters

T
Type of the sibling to check

Returns

bool true if a sibling of the specified type exists; false otherwise

DumpChildTo(TextWriter, int)

Inline.cs

Performs the dump child to operation.

protected virtual void DumpChildTo(TextWriter writer, int level)

Parameters

writer TextWriter
level int

DumpTo overloads

DumpTo(TextWriter)

Inline.cs

Dumps this instance to TextWriter.

public void DumpTo(TextWriter writer)
Parameters
writer TextWriter
The writer.
Exceptions
ArgumentNullException

DumpTo(TextWriter, int)

Inline.cs

Dumps this instance to TextWriter.

public void DumpTo(TextWriter writer, int level)
Parameters
writer TextWriter
The writer.
level int
The level of indent.
Exceptions
ArgumentNullException
if writer is null

FindBestParent()

Inline.cs

Performs the find best parent operation.

public Inline FindBestParent()

Returns

Inline

FindParentOfType<T>()

Inline.cs

Iterates on parents of the specified type.

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

Type parameters

T
Type of the parent to iterate over

Returns

IEnumerable<T> An enumeration on the parents of the specified type

FirstParentOfType<T>()

Inline.cs

Performs the first parent of type t operation.

public T? FirstParentOfType<T>() where T : notnull, Inline

Type parameters

T

Returns

T?

InsertAfter(Inline)

Inline.cs

Inserts the specified inline after this instance.

public void InsertAfter(Inline next)

Parameters

next Inline
The inline to insert after this instance.

Exceptions

ArgumentNullException
ArgumentException
Inline has already a parent

InsertBefore(Inline)

Inline.cs

Inserts the specified inline before this instance.

public void InsertBefore(Inline previous)

Parameters

previous Inline
The inline previous to insert before this instance.

Exceptions

ArgumentNullException
ArgumentException
Inline has already a parent

OnChildInsert(Inline)

Inline.cs

Performs the on child insert operation.

protected virtual void OnChildInsert(Inline child)

Parameters

child Inline

OnChildRemove(Inline)

Inline.cs

Performs the on child remove operation.

protected virtual void OnChildRemove(Inline child)

Parameters

child Inline

Remove()

Inline.cs

Removes this instance from the current list and its parent

public void Remove()

ReplaceBy(Inline, bool)

Inline.cs

Replaces this inline by the specified inline.

public Inline ReplaceBy(Inline inline, bool copyChildren = true)

Parameters

inline Inline
The inline.
copyChildren bool
if set to true the children of this instance are copied to the specified inline.

Returns

Inline The last children

Exceptions

ArgumentNullException
If inline is null