XmlCodeBlockElement

Represents a code block XML documentation element.

Syntax

public class XmlCodeBlockElement : XmlDocumentationElement

Inheritance

Constructors

XmlCodeBlockElement

public XmlCodeBlockElement()
Initializes a new instance of the XmlCodeBlockElement class.

XmlCodeBlockElement

public XmlCodeBlockElement(XElement element)
Initializes a new instance of the XmlCodeBlockElement class with XML content.

Parameters

  • element XElement: The XML element to parse.

Properties

Language

public string Language { get; set; }
Gets or sets the programming language for syntax highlighting.

Returns

string

Methods

ToMdx

public override string ToMdx()
Converts this code block element to MDX format with syntax highlighting.

Returns

string The MDX representation of this code block.

Remarks

The code element contains code examples or snippets. It is typically rendered as a formatted code block with syntax highlighting.