Table of Contents

Method BeginSection

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

BeginSection(ILogWriter, string?)

Begins a new indented log section, optionally with a title, and returns the log writer for further logging within the section.

public static ILogWriter BeginSection(this ILogWriter writer, string? sectionTitle = null)

Parameters

writer ILogWriter

The log writer to which the section will be written. Cannot be null.

sectionTitle string

The optional title for the log section. If specified, the title is written at the start of the section.

Returns

ILogWriter

The same ILogWriter instance, allowing for method chaining within the new section.

Remarks

A separator line is written before and after the section title, if provided. The log writer's indentation level is increased for all subsequent log entries until the indentation is changed or reset.