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
DiffMarkupFormatter
Implements
IMarkupFormatter
Extension Methods

Constructors

DiffMarkupFormatter()

Initializes a new instance of the DiffMarkupFormatter class.

public DiffMarkupFormatter()

Fields

Instance

Gets an instance of the DiffMarkupFormatter.

[Obsolete("This instance is not thread safe, use a new instance instead.")]
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)

protected override string Attribute(IAttr attr)

Parameters

attr IAttr

Returns

string

CloseTag(IElement, bool)

public override string CloseTag(IElement element, bool selfClosing)

Parameters

element IElement
selfClosing bool

Returns

string

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)

public override string OpenTag(IElement element, bool selfClosing)

Parameters

element IElement
selfClosing bool

Returns

string
.NET Foundation

Supported by the .NET Foundation.