Inline Class
Base class for all syntax tree inlines.
public abstract class Inline : MarkdownObject, IMarkdownObject, IInlineSee also
- Inheritance
MarkdownObjectInline- Implements
Constructors
| Name | Description |
|---|---|
| Inline() | Initializes a new instance of the Inline class. |
Inline()
Inline.csInitializes a new instance of the Inline class.
protected Inline()Properties
| Name | Description |
|---|---|
| IsClosed | Gets or sets a value indicating whether this instance is closed. |
| NextSibling | Gets the next sibling inline. |
| Parent | Gets the parent container of this inline. |
| PreviousSibling | Gets the previous inline. |
IsClosed
Inline.csNextSibling
Inline.csParent
Inline.csPreviousSibling
Inline.csMethods
| Name | Description |
|---|---|
| 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.csContainsParentOrSiblingOfType<T>()
Inline.csDetermines 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.
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.csPerforms the dump child to operation.
protected virtual void DumpChildTo(TextWriter writer, int level)Parameters
writerTextWriterlevelint
DumpTo overloads
DumpTo(TextWriter)
Inline.csDumps this instance to TextWriter.
public void DumpTo(TextWriter writer)DumpTo(TextWriter, int)
Inline.csDumps this instance to TextWriter.
public void DumpTo(TextWriter writer, int level)Parameters
writerTextWriter- The writer.
levelint- The level of indent.
Exceptions
ArgumentNullException- if writer is null
FindBestParent()
Inline.csFindParentOfType<T>()
Inline.csIterates on parents of the specified type.
public IEnumerable<T> FindParentOfType<T>() where T : InlineType parameters
T- Type of the parent to iterate over
Returns
IEnumerable<T> An enumeration on the parents of the specified type
FirstParentOfType<T>()
Inline.csPerforms the first parent of type t operation.
public T? FirstParentOfType<T>() where T : notnull, InlineType parameters
T
Returns
T?
InsertAfter(Inline)
Inline.csInserts the specified inline after this instance.
Parameters
nextInline- The inline to insert after this instance.
Exceptions
ArgumentNullExceptionArgumentException- Inline has already a parent
InsertBefore(Inline)
Inline.csInserts the specified inline before this instance.
Parameters
previousInline- The inline previous to insert before this instance.
Exceptions
ArgumentNullExceptionArgumentException- Inline has already a parent
OnChildInsert(Inline)
Inline.csOnChildRemove(Inline)
Inline.csRemove()
Inline.csRemoves this instance from the current list and its parent
public void Remove()ReplaceBy(Inline, bool)
Inline.csReplaces this inline by the specified inline.
Parameters
inlineInline- The inline.
copyChildrenbool- if set to
truethe children of this instance are copied to the specified inline.
Returns
Inline The last children
Exceptions
ArgumentNullException- If inline is null