Skip to content

MarkdownExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for creating .

csharp
public static class MarkdownExtensions

Inheritance

ObjectMarkdownExtensions

Methods

Markdown<TParent>(WidgetContext<TParent>, IHex1bDocument)

Creates a markdown widget backed by an . The document's is used for efficient change detection; re-parsing only occurs when the document version advances.

Parameters:

  • ctx (WidgetContext<<TParent>>): The widget context.
  • document (IHex1bDocument): The document to render as markdown.

Returns: MarkdownWidget

csharp
public static MarkdownWidget Markdown<TParent>(this WidgetContext<TParent> ctx, IHex1bDocument document) where TParent : Hex1bWidget

Markdown<TParent>(WidgetContext<TParent>, ReadOnlyMemory<char>)

Creates a markdown widget from a source.

Parameters:

  • ctx (WidgetContext<<TParent>>): The widget context.
  • source (ReadOnlyMemory<Char>): The markdown source memory.

Returns: MarkdownWidget

csharp
public static MarkdownWidget Markdown<TParent>(this WidgetContext<TParent> ctx, ReadOnlyMemory<char> source) where TParent : Hex1bWidget

Markdown<TParent>(WidgetContext<TParent>, string)

Creates a markdown widget that parses and renders the given markdown source.

Parameters:

  • ctx (WidgetContext<<TParent>>): The widget context.
  • source (String): The markdown source text.

Returns: MarkdownWidget

csharp
public static MarkdownWidget Markdown<TParent>(this WidgetContext<TParent> ctx, string source) where TParent : Hex1bWidget

Released under the MIT License.