MarkdownDocument
Namespace: Markdown
Markdown document.
public class MarkdownDocument : IMarkdownDocument
Inheritance Object → MarkdownDocument
Implements IMarkdownDocument
Properties
Capacity
Gets or sets the maximum number of markdown block elements that can be contained in the memory allocated by the current instance.
public int Capacity { get; set; }
Property Value
Int32
The maximum number of markdown block elements that can be contained in the memory allocated by the current instance.
Length
Gets the length of the current IMarkdownDocument object.
public int Length { get; }
Property Value
Int32
The length of this instance.
Constructors
MarkdownDocument()
Initializes a new instance of the MarkdownDocument class.
public MarkdownDocument()
MarkdownDocument(Int32)
Initializes a new instance of the MarkdownDocument class.
public MarkdownDocument(int capacity)
Parameters
capacity
Int32
The block elements capacity.
Methods
Append(IMarkdownBlockElement)
Appends the specified block element.
public IMarkdownDocument Append(IMarkdownBlockElement blockElement)
Parameters
blockElement
IMarkdownBlockElement
The block element.
Returns
IMarkdownDocument
A reference to this instance after the append operation has completed.
Clear()
Clears this markdown document.
public IMarkdownDocument Clear()
Returns
IMarkdownDocument
A reference to this instance after the clean operation has completed.
ElementAt(Int32)
Returns the specified block element at index.
public IMarkdownBlockElement ElementAt(int index)
Parameters
index
Int32
The block element index.
Returns
IMarkdownBlockElement
The block element.
IndexOf(IMarkdownBlockElement)
Returns the specified block element index.
public int IndexOf(IMarkdownBlockElement blockElement)
Parameters
blockElement
IMarkdownBlockElement
The block element.
Returns
Int32
The block element index.
Insert(Int32, IMarkdownBlockElement)
Inserts the specified block element into this instance at a specified position.
public IMarkdownDocument Insert(int index, IMarkdownBlockElement blockElement)
Parameters
index
Int32
The position in this instance where insertion begins.
blockElement
IMarkdownBlockElement
The block element to insert.
Returns
IMarkdownDocument
A reference to this instance after the insert operation has completed.
Remove(Int32)
Removes the specified block element at index.
public IMarkdownDocument Remove(int index)
Parameters
index
Int32
The block element index.
Returns
IMarkdownDocument
A reference to this instance after the excise operation has completed.
Remove(IMarkdownBlockElement)
Remove the specified block element.
public IMarkdownDocument Remove(IMarkdownBlockElement blockElement)
Parameters
blockElement
IMarkdownBlockElement
The block element.
Returns
IMarkdownDocument
A reference to this instance after the excise operation has completed.
Replace(IMarkdownBlockElement, IMarkdownBlockElement)
Replaces all occurrences of a specified block element in this instance with another specified block element.
public IMarkdownDocument Replace(IMarkdownBlockElement oldBlockElement, IMarkdownBlockElement newBlockElement)
Parameters
oldBlockElement
IMarkdownBlockElement
The block element to replace.
newBlockElement
IMarkdownBlockElement
The block element that replaces oldBlockElement.
Returns
IMarkdownDocument
A reference to this instance with all instances of oldBlockElement replaced by newBlockElement.
ToString()
Returns a string that represents the current markdown document.
public string ToString()
Returns
String
A string that represents the current markdown document.