Skip to main content

Interface IValueObjectStringFormatter<TValue>

Namespace: AdCodicem.ValueObjects
Assembly: AdCodicem.ValueObjects.Abstractions.dll

Declares that a value object produces its text directly, when writing into a buffer would be wasteful.

public interface IValueObjectStringFormatter<TValue>

Type Parameters

TValue

Underlying value type.

Remarks

Prefer , which can format without allocating. This one exists for rules whose output is naturally a string, and takes precedence over it when both are implemented.

Methods

FormatValue(in TValue, ReadOnlySpan<char>, IFormatProvider?)

Produces the text of a value.

public static abstract string FormatValue(in TValue value, ReadOnlySpan<char> format, IFormatProvider? provider)

Parameters

value TValue

Value to format.

format ReadOnlySpan<char>

Format specifier, possibly empty.

provider IFormatProvider?

Format provider.

Returns

string

The formatted text.