Table of Contents

Interface ILoggerBase

Namespace
SunamoLogging._public.SunamoInterfaces.Interfaces
Assembly
SunamoLogging.dll

Base logger interface providing common logging operations.

public interface ILoggerBase
Extension Methods

Methods

ClipboardOrDebug(string, params string[])

Writes output to clipboard or debug depending on build configuration.

void ClipboardOrDebug(string text, params string[] args)

Parameters

text string

The text to write.

args string[]

Format arguments.

IsInRightFormat(string, params string[])

Checks if the text is in the right format with the provided arguments.

bool IsInRightFormat(string text, params string[] args)

Parameters

text string

The format string to validate.

args string[]

Format arguments.

Returns

bool

True if the format is valid.

TwoState(bool, params string[])

Writes a two-state (boolean) value with additional data.

void TwoState(bool state, params string[] additionalData)

Parameters

state bool

The state value.

additionalData string[]

Additional data to append.

WriteCount(string, IList)

Writes the count of elements in a collection.

void WriteCount(string collectionName, IList list)

Parameters

collectionName string

The name of the collection.

list IList

The collection to count.

WriteLine(string, object)

Writes a labeled line with a label and value.

void WriteLine(string label, object value)

Parameters

label string

The label/prefix.

value object

The value to write.

WriteLine(string, params string[])

Writes a formatted line.

void WriteLine(string text, params string[] args)

Parameters

text string

The format string.

args string[]

Format arguments.

WriteLineFormat(string, params string[])

Writes a formatted line (legacy compatibility method).

void WriteLineFormat(string format, params string[] args)

Parameters

format string

The format string.

args string[]

Format arguments.

WriteLineNull(string, params string[])

Writes a line, converting null values to "(null)" string.

void WriteLineNull(string text, params string[] args)

Parameters

text string

The text to write.

args string[]

Format arguments.

WriteList(List<string>)

Writes all elements of a list, each on a separate line.

void WriteList(List<string> list)

Parameters

list List<string>

The list to write.

WriteList(string, List<string>)

Writes a labeled list, with all elements on separate lines.

void WriteList(string collectionName, List<string> list)

Parameters

collectionName string

The name/label of the collection.

list List<string>

The list to write.

WriteListOneRow(List<string>, string)

Writes all list elements in a single row separated by a delimiter.

void WriteListOneRow(List<string> list, string separator)

Parameters

list List<string>

The list to write.

separator string

The separator between elements.

WriteNumberedList(string, List<string>, bool)

Writes a numbered or unnumbered list.

void WriteNumberedList(string label, List<string> list, bool isNumbered)

Parameters

label string

The label/header for the list.

list List<string>

The list to write.

isNumbered bool

Whether to number the list items.