Table of Contents

Class DiffMarkupFormatter

Namespace
Bunit.Diffing
Assembly
Bunit.Web.dll

A markup formatter, that skips any special Blazor attributes added by the Htmlizer.

public class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter
Inheritance
HtmlMarkupFormatter
PrettyMarkupFormatter
DiffMarkupFormatter
Implements
IMarkupFormatter
Inherited Members
PrettyMarkupFormatter.Comment(IComment)
PrettyMarkupFormatter.Doctype(IDocumentType)
PrettyMarkupFormatter.Processing(IProcessingInstruction)
PrettyMarkupFormatter.Text(ICharacterData)
PrettyMarkupFormatter.Indentation
PrettyMarkupFormatter.NewLine
HtmlMarkupFormatter.LiteralText(ICharacterData)
Extension Methods

Constructors

DiffMarkupFormatter()

Initializes a new instance of the DiffMarkupFormatter class.

public DiffMarkupFormatter()

Fields

Instance

Gets an instance of the DiffMarkupFormatter.

public static readonly DiffMarkupFormatter Instance

Field Value

DiffMarkupFormatter

Remarks

The DiffMarkupFormatter is not thread safe, so using this singleton instance to format elements may not result in the desired effect.

Methods

Attribute(IAttr)

Creates the string representation of the attribute.

protected override string Attribute(IAttr attr)

Parameters

attr IAttr

The attribute to serialize.

Returns

string

The string representation.

CloseTag(IElement, bool)

Formats closing a tag with the given name.

public override string CloseTag(IElement element, bool selfClosing)

Parameters

element IElement

The element to close.

selfClosing bool

Is the element actually self-closing?

Returns

string

The formatted closing tag.

ConvertToString(IAttr)

Creates the string representation of the attribute.

public string ConvertToString(IAttr attr)

Parameters

attr IAttr

The attribute to serialize.

Returns

string

The string representation.

OpenTag(IElement, bool)

Formats opening a tag with the given name.

public override string OpenTag(IElement element, bool selfClosing)

Parameters

element IElement

The element to open.

selfClosing bool

Is the element actually self-closing?

Returns

string

The formatted opening tag.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.