TryFormat(LogMessage, Span, out Int32, ref LogMessageFormatSegments) Method

Definition

Assembly XenoAtom.Logging.dll

Formats a LogMessage into a Span<T> of characters.

public override bool TryFormat(LogMessage logMessage, Span<char> destination, scoped out int charsWritten, ref LogMessageFormatSegments segments)

Parameters

logMessage
LogMessage

The log message to format.

destination
Span<Char>

The destination characters span.

charsWritten
Int32

The number of characters written.

segments
LogMessageFormatSegments

The segments computed during the formatting. (optional)

Returns

Boolean
true if the format was successful; otherwise false if the characters span doesn't have enough space.