MarkdownObject Class

Base implementation for a the Markdown syntax tree.

public abstract class MarkdownObject : IMarkdownObject
Implements

Constructors

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

MarkdownObject()

MarkdownObject.cs

Initializes a new instance of the MarkdownObject class.

protected MarkdownObject()

Properties

NameDescription
ColumnGets or sets the text column this instance was declared (zero-based).
LineGets or sets the text line this instance was declared (zero-based).

Gets or sets the text column this instance was declared (zero-based).

public int Column { get; set; }

Property value

int

Gets or sets the text line this instance was declared (zero-based).

public int Line { get; set; }

Property value

int

Methods

NameDescription
ContainsData(object)Determines whether this instance contains the specified key data.
GetData(object)Gets the associated data for the specified key.
RemoveData(object)Removes the associated data for the specified key.
SetData(object, object)Stores a key/value pair for this instance.
ToPositionText()Gets a string of the location in the text.

ContainsData(object)

MarkdownObject.cs

Determines whether this instance contains the specified key data.

public bool ContainsData(object key)

Parameters

key object
The key.

Returns

bool true if a data with the key is stored

Exceptions

ArgumentNullException
if key is null

GetData(object)

MarkdownObject.cs

Gets the associated data for the specified key.

public object? GetData(object key)

Parameters

key object
The key.

Returns

object? The associated data or null if none

Exceptions

ArgumentNullException
if key is null

RemoveData(object)

MarkdownObject.cs

Removes the associated data for the specified key.

public bool RemoveData(object key)

Parameters

key object
The key.

Returns

bool true if the data was removed; false otherwise

Exceptions

ArgumentNullException

SetData(object, object)

MarkdownObject.cs

Stores a key/value pair for this instance.

public void SetData(object key, object value)

Parameters

key object
The key.
value object
The value.

Exceptions

ArgumentNullException
if key is null

ToPositionText()

MarkdownObject.cs

Gets a string of the location in the text.

public string ToPositionText()

Returns

string

Fields

NameDescription
SpanThe source span

Span

The source span

public SourceSpan Span