Table of Contents

Method LogDictionary

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

LogDictionary<T1, T2>(string, IDictionary<T1, T2>)

Logs the contents of the specified dictionary as a named section, writing each key-value pair using the application's logging mechanism.

public static void LogDictionary<T1, T2>(string sectionName, IDictionary<T1, T2> info)

Parameters

sectionName string

The name of the section under which the dictionary entries will be logged.

info IDictionary<T1, T2>

The dictionary containing the key-value pairs to log. Keys may be null.

Type Parameters

T1

The type of the keys in the dictionary.

T2

The type of the values in the dictionary.

Remarks

The method writes a begin section log entry with the specified section name, logs each key-value pair in the dictionary, and then writes an end section log entry. If a key is null, the string "null" is used as the key name in the log output.